fluentribbon / Fluent.Ribbon

WPF Ribbon control like in Office
http://fluentribbon.github.io
MIT License
2.48k stars 515 forks source link

StartScreen is opening the first time only #1190

Closed furqansafdar closed 4 months ago

furqansafdar commented 5 months ago

I have started using the sample StartScreen in my project and Bind the boolean property with IsOpen. The StartScreen is only showing the first time when I click the menu button but not afterwards.

<fluent:Ribbon.StartScreen>
    <fluent:StartScreen IsOpen="{Binding ShowStartPage, Mode=TwoWay}">
        <fluent:StartScreenTabControl>
            <fluent:StartScreenTabControl.LeftContent>
                <StackPanel Orientation="Vertical">
                    <Label
                        Content="StartScreen"
                        FontSize="48"
                        Foreground="{DynamicResource Fluent.Ribbon.Brushes.IdealForegroundColorBrush}" />
                </StackPanel>
            </fluent:StartScreenTabControl.LeftContent>
            <fluent:StartScreenTabControl.RightContent>
                <StackPanel Orientation="Vertical">
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">You can close the start screen by either clicking the button below or by pressing ESC</TextBlock>
                    <fluent:Button HorizontalAlignment="Center" IsDefinitive="True">Close start screen</fluent:Button>
                </StackPanel>
            </fluent:StartScreenTabControl.RightContent>
        </fluent:StartScreenTabControl>
    </fluent:StartScreen>
</fluent:Ribbon.StartScreen>
<fluent:Ribbon.Menu>
    <fluent:Backstage>
        <fluent:BackstageTabControl>
            <fluent:Button Command="{Binding StartPageCommand}" Header="Start Page" />
            <fluent:BackstageTabItem Header="New" />
            <fluent:BackstageTabItem Header="Open">
        </fluent:BackstageTabControl>
    </fluent:Backstage>
</fluent:Ribbon.Menu>
private bool _showStartPage = false;
public bool ShowStartPage
{
    get => _showStartPage;
    set => SetProperty(ref _showStartPage, value);
}

private ICommand _startPageCommand;
public ICommand StartPageCommand => _startPageCommand ??= new DelegateCommand(
    () =>
    {
        ShowStartPage = true;
    }
);

Environment

batzen commented 5 months ago

That's by design. If you want to show it again you have to set Shown to false again.