Coder Social home page Coder Social logo

Comments (9)

batzen avatar batzen commented on May 18, 2024

Could you post a small repro for that issue?
I can't reproduce it here.

from fluent.ribbon.

Alisaunder avatar Alisaunder commented on May 18, 2024

I even tried to have the Window open on the Latest Fluent Test App.
If you go to line 75 in TestContent.xaml, add x:Name and ISOpenChanged

<Fluent:Backstage x:Name="backstage" IsOpenChanged="OnIsOpenChanged" Visibility="{Binding IsChecked, ElementName=UseBackstage, Converter={StaticResource boolToVisibilityConverter}}">

Now open TextContent.xaml.cs and add the following

inside public TestContent() add

backstage.IsOpen = true;

under Public TestContent() but inside public partial class TestContent add the following function

        /// <summary>
        /// Occurs when the Backstage panel opens or closes.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">A <see cref="BooleanPropertyChangedRoutedEventArgs"/> that contains the event data.</param>        
        private void OnIsOpenChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            // If opening, ensure the that the New is always selected
            if (backstage.IsOpen)
                BackStageRecent.IsSelected = true;
        }

Now this has worked for me in the past and was working until a few patches ago, but I've also added some other things to my code on the Backstage Window. So I'm trying to find out if it's stopped working in the later versions of Fluent all together or if something has changed in the procedure to get the window to open, or if it's my code I've added the following is my added code.

<!-- Backstage Print Tab -->
                        <Fluent:BackstageTabItem x:Name="BackStagePrint" Header="Print" KeyTip="P" >
                            <DockPanel LastChildFill="True">
                                <StackPanel x:Name="PrintControlsContainer" Orientation="Vertical">
                                    <TextBlock Margin="40,30,40,15" Foreground="#FF444444" Text="Print" FontSize="40" FontFamily="Segoe UI Light"/>
                                    <StackPanel Orientation="Horizontal" >
                                        <Button Margin="40,0,0,0" x:Name="buttonPrint" HorizontalAlignment="Left" VerticalAlignment="Top" Height="80" Width="80" Style="{DynamicResource Office2013ButtonStyle}" Command="commands:MHManagerCommands.Print" >
                                            <StackPanel Orientation="Vertical">
                                                <Image Source="pack://application:,,,/MHManager;Component/Resources/Images/printer32.png" Height="32" Width="32" />
                                                <TextBlock HorizontalAlignment="Center" Text="Print" />
                                            </StackPanel>
                                        </Button>
                                        <Fluent:Spinner Margin="8,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Value="1" InputWidth="70" Format="0" Header="Copies: " Style="{DynamicResource SpinnerStyle}"/>
                                    </StackPanel>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Margin="40,15,0,0" Grid.Column="0" HorizontalAlignment="Left" Text="Printer" FontSize="22" TextTrimming="CharacterEllipsis" Foreground="#FF2b579a" />
                                        <Image x:Name="PrinterStatus" Grid.Column="1" HorizontalAlignment="Right" Source="pack://application:,,,/MHManager;Component/Resources/Images/info11.png" Width="11" Height="11" DataContext="{Binding}">
                                            <Image.ToolTip>
                                                <ToolTip Width="210">
                                                    <StackPanel Orientation="Vertical">
                                                        <TextBlock FontWeight="SemiBold">
                                                                <Run Text="Printer Status"/>
                                                        </TextBlock>
                                                        <TextBlock />
                                                        <StackPanel Orientation="Horizontal">
                                                            <TextBlock Margin="5,0,0,0" Text="Status: " />
                                                            <TextBlock Text="{Binding Path=PrinterStatus}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" />
                                                        </StackPanel>
                                                        <StackPanel Orientation="Horizontal">
                                                            <TextBlock Margin="5,0,0,0" Text="Type: " />
                                                            <TextBlock Text="{Binding PrinterName}" />
                                                        </StackPanel>
                                                        <StackPanel Orientation="Horizontal">
                                                            <TextBlock Margin="5,0,0,0" Text="Where: " />
                                                            <TextBlock Text="{Binding PrinterPort}" />
                                                        </StackPanel>
                                                        <TextBlock Margin="5,0,0,0" Text="Comment: " />
                                                        <TextBlock />
                                                    </StackPanel>
                                                </ToolTip>
                                            </Image.ToolTip>
                                        </Image>
                                    </Grid>
                                    <Fluent:ComboBox IsSynchronizedWithCurrentItem="True" x:Name="pList" Margin="40,5,0,0" DataContext="{Binding}" FontSize="11" ItemTemplate="{StaticResource pListMenuItems}" Header="{Binding Path=PrinterName, Mode=TwoWay}">
                                        <swi:Interaction.Triggers>
                                            <swi:EventTrigger EventName="SelectionChanged">
                                                <swi:InvokeCommandAction Command="commands:MHManagerCommands.PrintDeviceSelectionChanged" />
                                            </swi:EventTrigger>
                                        </swi:Interaction.Triggers>
                                        <Fluent:ComboBox.ToolTip>
                                            <ToolTip Width="Auto">
                                                <StackPanel Orientation="Vertical">
                                                    <TextBlock FontWeight="SemiBold" Text="Printer Status"/>
                                                    <TextBlock />
                                                    <StackPanel Orientation="Horizontal">
                                                        <TextBlock Margin="5,0,0,0" Text="Status: " />
                                                        <TextBlock Text="{Binding Path=PrinterStatus}" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" />
                                                    </StackPanel>
                                                    <StackPanel Orientation="Horizontal">
                                                        <TextBlock Margin="5,0,0,0" Text="Type: " />
                                                        <TextBlock Text="{Binding Path=PrinterName}" />
                                                    </StackPanel>
                                                    <StackPanel Orientation="Horizontal">
                                                        <TextBlock Margin="5,0,0,0" Text="Where: " />
                                                        <TextBlock Text="{Binding Path=PrinterPort}" />
                                                    </StackPanel>
                                                    <TextBlock Margin="5,0,0,0" Text="Comment: " />
                                                    <TextBlock />
                                                </StackPanel>
                                            </ToolTip>
                                        </Fluent:ComboBox.ToolTip>
                                        <Fluent:ComboBox.Menu>
                                            <Fluent:RibbonMenu>
                                                <Fluent:MenuItem Header="Add Printer..."  />
                                                <Fluent:MenuItem Header="Print to File" />
                                            </Fluent:RibbonMenu>
                                        </Fluent:ComboBox.Menu>
                                    </Fluent:ComboBox>
                                    <TextBlock Margin="25,5,10,0" TextAlignment="Right" FontSize="12" ><Hyperlink x:Name="PrinterProperties" Foreground="#FF2b579a" Command="commands:MHManagerCommands.PrinterProperties"><Run Text="Printer Properties"/></Hyperlink></TextBlock>
                                    <TextBlock Margin="40,15,0,0" Grid.Column="0" HorizontalAlignment="Left" Text="Settings" FontSize="22" TextTrimming="CharacterEllipsis" Foreground="#FF2b579a" />
                                    <Fluent:ComboBox x:Name="dsListMenu" Margin="40,5,0,0" GroupBy="Tag" IsTextSearchEnabled="True" ResizeMode="Vertical" MinWidth="40" SizeDefinition="Large" SelectedIndex="0">
                                        <Button Tag="Document" x:Name="PrintAllPages" HorizontalContentAlignment="Left" Background="White" MaxWidth="300" BorderBrush="White">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="pack://application:,,,/MHManager;Component/Resources/Images/PrintAllPages.png" Width="32" Height="32" />
                                                <StackPanel Orientation="Vertical">
                                                    <TextBlock Margin="5,0,0,0" Text="Print All Pages" />
                                                    <TextBlock Margin="5,0,0,0" Text="The whole thing" />
                                                </StackPanel>
                                            </StackPanel>
                                        </Button>
                                        <Button Tag="Document" HorizontalContentAlignment="Left" Background="White" MaxWidth="300" BorderBrush="White">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="pack://application:,,,/MHManager;Component/Resources/Images/PrintSelection.png" Width="32" Height="32"  />
                                                <StackPanel Orientation="Vertical">
                                                    <TextBlock Margin="5,0,0,0" Text="Print Selection" />
                                                    <TextBlock Margin="5,0,0,0" Text="Just what you selected" />
                                                </StackPanel>
                                            </StackPanel>
                                        </Button>
                                        <Button Tag="Document" HorizontalContentAlignment="Left" Background="White" MaxWidth="300" BorderBrush="White">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="pack://application:,,,/MHManager;Component/Resources/Images/PrintCurrentPage.png" Width="32" Height="32"  />
                                                <StackPanel Orientation="Vertical">
                                                    <TextBlock Margin="5,0,0,0" Text="Print Current Page" />
                                                    <TextBlock Margin="5,0,0,0" Text="Just this page" />
                                                </StackPanel>
                                            </StackPanel>
                                        </Button>
                                        <Button Tag="Document" HorizontalContentAlignment="Left" Background="White" MaxWidth="300" BorderBrush="White">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="pack://application:,,,/MHManager;Component/Resources/Images/PrintCustomRange.png" Width="32" Height="32"  />
                                                <StackPanel Orientation="Vertical">
                                                    <TextBlock Margin="5,0,0,0" Text="Custom Print" />
                                                    <TextBlock Margin="5,0,0,0" Text="Type specific pages, sections or ranges" TextTrimming="CharacterEllipsis" />
                                                </StackPanel>
                                            </StackPanel>
                                        </Button>
                                        <Button Tag="Document Info" HorizontalContentAlignment="Left" Background="White"  MaxWidth="300" BorderBrush="White">
                                            <StackPanel Orientation="Vertical">
                                                <TextBlock Margin="20,0,0,0" Text="Document Info" />
                                                <TextBlock Margin="20,0,0,0" Text="List of properties, such as file name, author and title" TextTrimming="CharacterEllipsis" />
                                            </StackPanel>
                                        </Button>
                                    </Fluent:ComboBox>
                                </StackPanel>
                                <Rectangle DockPanel.Dock="Left" Margin="50,60,0,30" Width="1" Fill="{StaticResource LargeVerticalSeparatorBrush}" HorizontalAlignment="Left" />
                            </DockPanel>
                        </Fluent:BackstageTabItem>

Basically I'm adding a print tab that resembles Office 2013

http://adamtdavis.com/screenshot.png

from fluent.ribbon.

batzen avatar batzen commented on May 18, 2024

The easiest way to find out if it's your code or the library is to create a small project (for example copying and modifying the showcase application) which tries to reproduce the issue.

from fluent.ribbon.

Alisaunder avatar Alisaunder commented on May 18, 2024

Well I figured if I couldn't get it to work using your example program then something wasn't right with the control. But I will create a small app to see.

from fluent.ribbon.

batzen avatar batzen commented on May 18, 2024

You don't have to create something new. Just modify the showcase to show your issue,create a .zip package and attach it to this issue.

from fluent.ribbon.

Alisaunder avatar Alisaunder commented on May 18, 2024

I have the modified showcase here it's the Fluent Test dotNet 4.5 version that is modified.
http://www.adamtdavis.com/Fluent.Ribbon-master.zip

from fluent.ribbon.

batzen avatar batzen commented on May 18, 2024

I can't open rar archives,could you upload a zip archive instead?

from fluent.ribbon.

Alisaunder avatar Alisaunder commented on May 18, 2024

Modified link

from fluent.ribbon.

batzen avatar batzen commented on May 18, 2024

Now i finally get what you where doing.
Having the backstage open at application start.

from fluent.ribbon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.