Completed
Last Updated: 13 Sep 2019 13:29 by ADMIN
Release 2.0.0
Tyler
Created on: 06 Jun 2019 18:59
Category: Window
Type: Bug Report
0
When minimizing a Window then closing that window the next time it opens it is back to the default size but not showing content
When minimizing a Window then closing that window the next time it is opened, it is back to the default size but not showing content. 
It does show the un-minimize icon and when clicking on it restores the content within the window.
3 comments
ADMIN
Marin Bratanov
Posted on: 10 Jun 2019 15:16
Hello Tyler,

Thank you for getting back to me. It seems obvious now that you pointed me in the right direction - the width and height properties are rendered as inline style="width: ...; height: ...;" on the window wrapper and so they take effect when the window is re-shown - minimizing sets height:0, but when re-rendeing it is taken from the component parameter.

This will need some research in order to get improved, though, because minimizing must not break parameter binding, and at the same time - it must alter the same values as the parameters. 

I can think of only one workaround - removing the Width and Height of the window and setting them to the wrapper of the content, so that the size of the content will control the size of the window, like in my example.


Regards,
Marin Bratanov
Progress Telerik UI for Blazor
Tyler
Posted on: 10 Jun 2019 12:38

Hi Marin,

It happens when I add Width and Height properties to TelerikWindow.
Here is your example with the issue and an attached video.

 

```

 

@page "/"
@using Telerik.Blazor.Components.Window

<button onclick="@ShowWindow">Show the Window</button>

<TelerikWindow ref="myFirstWindow"  Width="700px" Height="400px">
    <TelerikWindowTitle>
        <strong>The Title</strong>
    </TelerikWindowTitle>
    <TelerikWindowActions>
        <TelerikWindowAction Name="Minimize"></TelerikWindowAction>
        <TelerikWindowAction Name="Maximize"></TelerikWindowAction>
        <TelerikWindowAction Name="Close"></TelerikWindowAction>
    </TelerikWindowActions>
    <TelerikWindowContent>
        <div style="width: 400px; height: 400px; background: yellow;">I am 400 by 400 pixels and bright yellow.</div>
    </TelerikWindowContent>
</TelerikWindow>

@functions {
    Telerik.Blazor.Components.Window.TelerikWindow myFirstWindow;

    public void ShowWindow()
    {
        myFirstWindow.Open();
    }
}

 

```

Attached Files:
ADMIN
Marin Bratanov
Posted on: 07 Jun 2019 04:28
Hi Tyler,

Could you try this snippet, because it seems to work fine for me? I am attaching below a short video of my tests (and the components I tested with), am I missing something?

@using Telerik.Blazor.Components.Window
 
<button onclick="@ShowWindow">Show the Window</button>
 
<TelerikWindow ref="myFirstWindow">
    <TelerikWindowTitle>
        <strong>The Title</strong>
    </TelerikWindowTitle>
    <TelerikWindowActions>
        <TelerikWindowAction Name="Minimize"></TelerikWindowAction>
        <TelerikWindowAction Name="Maximize"></TelerikWindowAction>
        <TelerikWindowAction Name="Close"></TelerikWindowAction>
    </TelerikWindowActions>
    <TelerikWindowContent>
        <div style="width: 400px; height: 400px; background: yellow;">I am 400 by 400 pixels and bright yellow.</div>
    </TelerikWindowContent>
</TelerikWindow>
 
@functions {
    Telerik.Blazor.Components.Window.TelerikWindow myFirstWindow;
 
    public void ShowWindow()
    {
        myFirstWindow.Open();
    }
}


Regards,
Marin Bratanov
Progress Telerik UI for Blazor