开发者

GUI for single interface approach

开发者 https://www.devze.com 2023-04-10 18:56 出处:网络
I\'ve made a small application using MDI but I want to make another one where there is only one main window and the main container changes or updates. I\'m sure this can be done without c开发者_运维知

I've made a small application using MDI but I want to make another one where there is only one main window and the main container changes or updates. I'm sure this can be done without c开发者_运维知识库reating multiple panels but I've been doing a bit of reading and I can't seem to find how can I do this.


If I understand you correctly you want to keep only one form. You can use tab control and switch between different pages, or create a set of user controls and then manage yourself what user control to show


For my scrum information radiator (full screen application for a big TV in portrait) I decided to use a set of controls from Actipro. I have multiple windows, but only one visible at a time. The user can use the arrow keys to "swipe" windows in and out just like they're used to do in smartphones.

The control used was the ZapPanel, as seen in my xaml below:

    <ListBox x:Name="listBox" Grid.RowSpan="2" BorderThickness="0" Focusable="False" SelectionMode="Single" 
             SnapsToDevicePixels="True" VerticalContentAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
             ScrollViewer.VerticalScrollBarVisibility="Hidden" Background="Black">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <views:ZapPanel AreChildrenWrapped="True" Orientation="Horizontal" AreLeavingElementsAnimated="True" Background="Black" />
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
    </ListBox>

    <StackPanel Orientation="Horizontal" Height="30" Margin="10" VerticalAlignment="Top" Opacity="0.5" >
        <Button Click="PrevButtonClick">Prev</Button>
        <Button Click="NextButtonClick">Next</Button>
    </StackPanel>



</Grid>

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号