Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Flip border content?
posted

I have the xamal silverlight page like the below. When I click the Flip button, I need to change the content of boder 'AreaA' and AreaB

 <UserControl x:Class="TestSL.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <!--<Grid x:Name="LayoutRoot" Background="White">

    </Grid>-->
    <StackPanel x:Name="LayoutRoot">
        <Button Content="Flip" Click="Button_Click"></Button>
        <Border x:Name="AreaA">
            <Border x:Name="b1" MinHeight="100" Background="LightGray">
                <Button Width="100" x:Name="b11" Content="I am from b1"></Button>
            </Border>
        </Border>
        <Border x:Name="AreaB">
            <Border x:Name="b2" MinHeight="100" Background="Gray">
                <Button Width="100" x:Name="b21" Content="I am from b2"></Button>

            </Border>
        </Border>

    </StackPanel>
</UserControl>

 

Note: I have controls like xamwebchart and etc in one border and some other controls in another border section. I need to have fliping mechanism implemented.

 

Thanks

-Sajin

  • 138253
    Offline posted

    Hello Sajin,

    Thank you for your post. I have been looking though it and I attached a sample project demonstrating the functionality you want to achieve. I added some comments in the code, because I implemented two possible ways for your desired behavior, so you can chose the one that best suits your requirements. Please let me now if you need any further assistance on this matter.

    Looking forward for your reply.

    StackPanelSwapChildren.zip