none
Ribbon Design Trouble RRS feed

  • 常规讨论

  • I wonder if any one has met problem like this, it happened approximately after i added RibbonContextualTabGroups:

    XAML starts like this:

    <ribbon:RibbonWindow x:Class="MUNNote.RibbonWindow1"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" x:Name="MainW"
            Width="800" Height="600" Icon="/MUNNote;component/IconResources/UN.ico" MinWidth="640" MinHeight="480" Loaded="Window_Loaded" Closing="Window_Closing" Title="Model United Nation Note">
        <Grid x:Name="LayoutRoot">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="219" />
                <ColumnDefinition Width="342*" />
                <ColumnDefinition Width="219" />
            </Grid.ColumnDefinitions>
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="#FFC1D6EB" Offset="1" />
                </LinearGradientBrush>
            </Grid.Background>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="404*"/>
                <RowDefinition Height="20" />
            </Grid.RowDefinitions>
    
            <!--Ribbon UI-->
            
             <ribbon:Ribbon x:Name="Ribbon" Grid.ColumnSpan="3" Title="Model United Nation Note">

    ... and <ribbon:Ribbon> ends like this:

                </ribbon:RibbonTab>
    
                    <ribbon:Ribbon.ContextualTabGroups>
                    <ribbon:RibbonContextualTabGroup x:Name="RollCallTabGroup" Header="Roll-Call" Background="#FF5CE0E5" />
                    <ribbon:RibbonContextualTabGroup x:Name="AgendaTabGroup" Header="Set Agenda" Background="#FFF58D8F" />
                    <ribbon:RibbonContextualTabGroup x:Name="DebateTabGroup" Header="Debate" Background="#FFFCE9C1" />
                    <ribbon:RibbonContextualTabGroup x:Name="MotionTabGroup" Header="Motion" Background="#FF8A37D8" />
                    <ribbon:RibbonContextualTabGroup x:Name="FinalVoteGroup" Header="Vote" Background="#FF5883C7" />
                </ribbon:Ribbon.ContextualTabGroups>
            </ribbon:Ribbon>

    2013年2月16日 7:45

全部回复

  • 你好,

    你说的问题是指截图中第一个tab显示的一些“雪花”问题吗?在我这边并不可以重现,建议你新建一个工程或者换台电脑试一下

    以下是测试的代码和结果截图:

     <Grid x:Name="LayoutRoot">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="219" />
                <ColumnDefinition Width="342*" />
                <ColumnDefinition Width="219" />
            </Grid.ColumnDefinitions>
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="#FFC1D6EB" Offset="1" />
                </LinearGradientBrush>
            </Grid.Background>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="404*"/>
                <RowDefinition Height="20" />
            </Grid.RowDefinitions>
            <!--Ribbon UI-->
            <ribbon:Ribbon>
                <ribbon:RibbonTab x:Name="HomeTab" 
                                  Header="Home">
                    <ribbon:RibbonGroup x:Name="Group1" 
                                        Header="Group1">
                        <ribbon:RibbonButton x:Name="Button1"                                       
                                             Label="Button1" />
                        <ribbon:RibbonButton x:Name="Button2"                                     
                                             Label="Button2" />
                        <ribbon:RibbonButton x:Name="Button3"                  
                                             Label="Button3" />
                      
                    </ribbon:RibbonGroup>
                </ribbon:RibbonTab>
                <ribbon:Ribbon.ContextualTabGroups >
                    <ribbon:RibbonContextualTabGroup x:Name="RollCallTabGroup" Header="Roll-Call" Background="#FF5CE0E5" />
                    <ribbon:RibbonContextualTabGroup x:Name="AgendaTabGroup" Header="Set Agenda" Background="#FFF58D8F" />
                    <ribbon:RibbonContextualTabGroup x:Name="DebateTabGroup" Header="Debate" Background="#FFFCE9C1" />
                    <ribbon:RibbonContextualTabGroup x:Name="MotionTabGroup" Header="Motion" Background="#FF8A37D8" />
                    <ribbon:RibbonContextualTabGroup x:Name="FinalVoteGroup" Header="Vote" Background="#FF5883C7" />
                </ribbon:Ribbon.ContextualTabGroups>
               
            </ribbon:Ribbon>
     </Grid>


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2013年2月18日 7:25
    版主
  • 你好,

    请问你的问题现在解决了吗?你有尝试我post中得建议吗?

    谢谢,


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2013年2月27日 10:32
    版主
  • 你好,

    由于你没有提供更进一步的信息来让我们继续对该帖的进行跟进,所以我会暂时将其改为讨论贴,如果你有更多的信息提供给我们,请随时将其改为问题帖。

    感谢你的理解与支持。


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2013年2月28日 5:26
    版主