question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not place <Grid> in <Fluent:RibbonWindow> with <Fluent:Ribbon>

See original GitHub issue

I’m trying to follow the basic setup tutorial, but I’m receiving an error “The property “Content” can only be set once.”

<Fluent:RibbonWindow x:Name="winMain" x:Class="Icon_Labeler.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Fluent="urn:fluent-ribbon"
        Title="Ben's Icon Labeler" Height="600" Width="800" Drop="WinMain_Drop" DragEnter="WinMain_DragEnter" AllowDrop="True">

    <Fluent:Ribbon>
        <!--Backstage-->
        <Fluent:Ribbon.Menu>
            <Fluent:Backstage>
            </Fluent:Backstage>
        </Fluent:Ribbon.Menu>

        <!--Tabs-->
        <Fluent:RibbonTabItem Header="Home">
            <Fluent:RibbonGroupBox Header="Group">
                <Fluent:Button Header="Green"
                            Icon="Images\Green.png"
                            LargeIcon="Images\GreenLarge.png" />
            </Fluent:RibbonGroupBox>
        </Fluent:RibbonTabItem>
    </Fluent:Ribbon>
    
    <Grid></Grid>
   
</Fluent:RibbonWindow>

Environment

  • Fluent.Ribbon v5.0.1.10
  • Windows 10
  • .NET Framework 4.6.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
batzencommented, Apr 14, 2017

Will change the tutorial to show the complete assembled code for a first window to prevent such starting issues in the future.

1reaction
batzencommented, Apr 14, 2017

Because you are trying exactly that, setting the content twice. Your first content is <Fluent:Ribbon> and the second is <Grid> you have to do something like:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Fluent:Ribbon Grid.Row="0">
        ....
    </Fluent:Ribbon>
    <Grid Grid.Row="1">
       <TextBlock>My first window containing a Ribbon and something else.</TextBlock>
    </Grid>
</Grid>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is ribbon items not showing on the window?
I'm developing an app, using .NET Core 3.1. adding reference to Fluent Ribbon but when I write some XAML nothing shows. <Window x:Class="WpfApp2 ......
Read more >
Can not get started with Fluent Ribbon (Black window ...
Hello. I am trying to use Fluent Ribbon, but it does not work in my way. Nothing appeared in the preview window in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found