iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
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) ????
Thank you for the snippet code of UXWindow style.
I started my investigation by adding the provided style into my UXWindow page. However there are some values of the properties that I can’t find the reference. For example:
<Setter Property="ContentBackground" Value="{StaticResource WindowContentBackgroundColor}"/>
So I decided to set those properties with a random value. Next, I tried to add controls into the UXWindow page. Unfortunately, I was unable to reproduce the reported problem. The UXWindow page accepts new controls and the buttons (close button and minimize button) can be seen on the upper-right corner of the window.
I suspect that there is another style which may cause the reported problem. Please have the modified xaml page evaluated on your end and let us hear your response.
...And how can i Handle Buttons events (Close and Minimise)?...
You can use the built-in command for the buttons (close button and minimize button).
thanx for your reply, the problem persists because when we remove the following width attributes the buttons are put on the left:
<Grid.ColumnDefinitions > <ColumnDefinition Width="575" /> <ColumnDefinition Width="25"/> <ColumnDefinition Width="25"/> </Grid.ColumnDefinitions>
and if i leave it like that when i resize the window, the buttons are hidden, not always stack on the topper right of the window.
Besides,
I want to know (if possible) how to handle closing and minimizing buttons events from the my style file...
Here is my modified code.
I tried somthing in the SecondTry.xaml file; I added this property
<Setter Property="HeaderHorizontalAlignment" Value="Right"/>
Tthe buttons stack now on the right side and move with window. However, the title of the window with this property can never be centred or on the left side of the window...
And i still can not handle button events from the style page :(
Waiting forward for your answer.
Have a nice day
I have modified the style of UXWindow so that now the buttons will always be on the top right and the header will always be on the top left. In order to handle the closing and minimizing button, I simply use the built-in command as shown in the following snippet code.
<Intersoft:UXButton x:Name="uXBtnClose" Grid.Column="1" Command="command:WindowCommands.Close"/> <Intersoft:UXButton x:Name="uXBtnMinimise" Grid.Column="2" Command="command:WindowCommands.Minimize"/>
Please have the modified evaluated on your and let us hear whether this helps or not.
Thank you and have a nice day.
Thank you for your precious help ...
Im gonna test this...
Have a nice day.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname