UXWindow General Template Style

4 replies. Last post: June 11, 2013 4:51 AM by Haythem Karoui
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hi!

I need to set up my UXwindows template style the way i can use it any time i create a new Ux window in my UXdesktop project.

I did the following:
I created a style foy my uxwindow.

here is my issue : when i try to add buttons (close and minimize) inside the style that does not work.
i copy you my code:

<Style x:Key="WindowStyle" TargetType="Intersoft:UXWindow">
        <Setter Property="HeaderTemplate" >
            <Setter.Value>
                <DataTemplate >
                    <Grid x:Name="LayoutRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions >
                            <ColumnDefinition Width="575*" />
                            <ColumnDefinition Width="25"/>
                            <ColumnDefinition Width="25"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="{Binding BindsDirectlyToSource=True}" Style="{StaticResource HeaderStyle}"/>
                        <Intersoft:UXButton x:Name="uXBtnClose" Style="{StaticResource BarBtnCloseStyle}"  />
                        <Intersoft:UXButton x:Name="uXBtnMinimise" Style="{StaticResource BarBtnMinimiseStyle}"  />
                        
                    </Grid>
                    
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DropShadow">
            <Setter.Value>
                <DropShadowEffect/>
            </Setter.Value>
        </Setter>
        <Setter Property="WindowStartupLocation" Value="CenterScreen"/>
        <Setter Property="Height" Value="480"/>
        <Setter Property="Width" Value="640"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="ContentBackground" Value="{StaticResource WindowContentBackgroundColor}"/>
        <Setter Property="ContentBorderBrush" Value="{StaticResource WindowContentBorderBrush}"/>      
        <Setter Property="Foreground" Value="{StaticResource WindowForeground}"/>
        <Setter Property="HeaderForeground" Value="White"/>
        <Setter Property="InnerBackground" Value="{StaticResource WindowInnerBackground}"/>
        <Setter Property="HeaderDisplayMode" Value="Content"/>
        <Setter Property="Background" Value="{StaticResource WindowBackground}"/>
        <Setter Property="InnerBorderBrush" Value="{x:Null}"/>
        <Setter Property="ContentBorderThickness" Value="0"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="CornerRadius" Value="15"/>
        <Setter Property="HeaderMargin" Value="7"/>
        <Setter Property="InnerBorderThickness" Value="0"/>
        <Setter Property="ControlBoxVisibility" Value="Collapsed"/>
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="FontFamily" Value="Euphemia"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="BusyText" Value="Please Wait"/>
        
        
    </Style>

when i remove the underlined part the window accepts new controls, but i will not have close and minimize button , and i put it back all my controls disappear!!!

example
this is how my window should look like : Image_thummb16.png and this is what i get : ResultImage.png

It seems like i created a stunned template.. how can i fix that ???
And how can i Handle Buttons events (Close and Minimise) ????

 
Cordially, Haythem Karoui
All times are GMT -5. The time now is 5:18 PM.
Previous Next