File Menu controls

Jul 13, 2012 at 12:01 PM

Hi, i wish to create a File Menu like Word, but i cannot add textbox, radiobutton and label inside BackstageTabItem. I used this code:

<Fluent:Backstage>                   

<Fluent:BackstageTabControl>                       

<Fluent:BackstageTabItem Header="Impostazioni Base">                           

<TabControl Margin="20,5,20,5" Style="{DynamicResource InnerBackstageTabControlStyle}">                               

<Fluent:SeparatorTabItem Header="Parametri Registratore di Cassa                                                      " HorizontalAlignment="Left" />                                <Fluent:Button Name="btnAppo" Header="APPO" />                                    <Fluent:RadioButton Name="slFasy" Header="Fasy" IsChecked="True" />                                <Fluent:RadioButton Name="slNCR" Header="NCR" />                                                 </TabControl>                       

</Fluent:BackstageTabItem>                        

</Fluent:BackstageTabControl>               

</Fluent:Backstage>

I cannot see my controls inside the content of BackstageTabItem, but it create a sub menù for every single control.

Can you help me?

Tnx

Jul 14, 2012 at 9:03 PM

Hi,

you're mistace is you're adding all these objects as TabItems. Create a TabItem first and then add your content. Just like this:

<Fluent:BackstageTabControl>
    <Fluent:BackstageTabItem Header="Backup &amp; Restore">
        <TabControl Style="{DynamicResource InnerBackstageTabControlStyle}" SelectedIndex="1" Margin="6,0,0,0">
            <Fluent:SeparatorTabItem Header="Backup &amp; Restore" MinWidth="200"/>
            <TabItem Header="Backup">
                <Grid Margin="15,0,0,0">
                    <StackPanel>
                        <Fluent:SeparatorTabItem Header="Backup" MinWidth="200"/>
                        <Grid Margin="20,20,0,0" >
                            <Grid Width="81" HorizontalAlignment="Left">
                                <Fluent:Button Style="{DynamicResource ButtonBackstageStyle}" Header="Backup" Height="85" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="81" Icon="Images/backup.png" LargeIcon="Images/backup.png"  />
                            </Grid>
                            <Grid Margin="101,0,0,0">
                                <StackPanel VerticalAlignment="Center">
                                    <TextBlock Text="Observe the following instructions for backuping your data:" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,5" />
                                    <Grid>
                                        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                        <TextBlock Text="Do regular Backups" Margin="14,0,0,0" TextWrapping="Wrap" />
                                    </Grid>
                                    <Grid>
                                        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                        <TextBlock Text="Save your backups also on external devices (USB-Stick)" Margin="14,0,0,0" TextWrapping="Wrap" />
                                    </Grid>
                                </StackPanel>
                            </Grid>
                        </Grid>
                    </StackPanel>
                </Grid>
            </TabItem>
            <TabItem Header="Restore">
                <Grid Margin="15,0,0,0">
                    <StackPanel>
                        <Fluent:SeparatorTabItem Header="Restore" MinWidth="200"/>
                        <Grid Margin="20,20,0,0">
                            <Grid Width="81" HorizontalAlignment="Left">
                                <Fluent:Button Style="{DynamicResource ButtonBackstageStyle}" Header="Restore" Height="85" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="81" Icon="Images/restore.png" LargeIcon="Images/restore.png"  />
                            </Grid>
                            <Grid Margin="101,0,0,0" >
                                <StackPanel VerticalAlignment="Center">
                                    <TextBlock Text="Observe the following instructions while restoring your data:" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,5" />
                                    <Grid>
                                        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                        <TextBlock Text="Make regular updates to have actual data in the worst case" Margin="14,0,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                    </Grid>
                                    <Grid>
                                        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                        <TextBlock Text="Databases didn't exist at the backup-time will not be changed" Margin="14,0,0,0" TextWrapping="Wrap" />
                                    </Grid>
                                    <ProgressBar Name="ProgressBar4" Visibility="Collapsed" Height="15" Margin="0,5,0,0" />
                                </StackPanel>
                            </Grid>
                        </Grid>
                        <Fluent:SeparatorTabItem Header="Last Backups" MinWidth="200" Margin="0,20,0,0" />
                        <TextBlock Text="Choose an item from the bottom list to restore immediately." Margin="30,20,0,0" TextWrapping="Wrap" />
                        <TabControl Style="{DynamicResource InnerBackstageTabControlStyle}" Margin="30,10,200,0" Name="TabControlLastSaves" ItemsSource="{Binding}" MinHeight="100" SelectedIndex="-1" IsEnabled="True">
                            <TabControl.ItemTemplate>
                                <DataTemplate>
                                    <!-- Name -->
                                    <TextBlock Text="{Binding Value}" Width="{Binding ElementName=TabControlLastSaves, Path=ActualWidth}" Height="20" VerticalAlignment="Center" />
                                </DataTemplate>
                            </TabControl.ItemTemplate>
                        </TabControl>
                    </StackPanel>
                </Grid>
            </TabItem>
        </TabControl>
    </Fluent:BackstageTabItem>
</Fluent:BackstageTabControl>

Jul 17, 2012 at 6:35 AM

Ok thank you very much!