Results 1 to 2 of 2

Thread: WPF ribbon

  1. #1

    Thread Starter
    Hyperactive Member Mike Storm's Avatar
    Join Date
    Jun 2017
    Location
    Belgium
    Posts
    425

    WPF ribbon

    Hi,
    A question...
    Is it possible to use the WPF ribbon control placed on a usercontrol as the ribbon menu on a VB windows forms application?

    And is there some tutorials that are relativly easy to understand? i Have never used WPF.

    Thanks

  2. #2

    Thread Starter
    Hyperactive Member Mike Storm's Avatar
    Join Date
    Jun 2017
    Location
    Belgium
    Posts
    425

    Re: WPF ribbon

    Hi again,
    I have foud a sample and i m testing, but run in to something that i'm not understanding:

    Code:
    <UserControl x:Class="RBNAPPMENU"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:local="clr-namespace:GFS"
                 mc:Ignorable="d" 
                 d:DesignHeight="113.099" d:DesignWidth="463.025" >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Ribbon Grid.Row="0"
                Grid.Column="0" Margin="0,-23,0,23">
                <Ribbon.ApplicationMenu  >
                    <RibbonApplicationMenu Visibility="Collapsed"/>
                </Ribbon.ApplicationMenu>
                <RibbonTab Header="Contactos">
                    <RibbonGroup Header="Clientes">
                        <RibbonButton Label="Clientes" />
                    </RibbonGroup>
                </RibbonTab> 
            </Ribbon>
        </Grid>
    
    </UserControl>
    If i do it like in the code above it works, the application loads normaly
    If i add this SmallImageSource="/Resources/CLIENTES16.png" LargeImageSource="/Resources/CLIENTES32.png" to the RibbonButton,

    Code:
    <UserControl x:Class="RBNAPPMENU"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:local="clr-namespace:GFS"
                 mc:Ignorable="d" 
                 d:DesignHeight="113.099" d:DesignWidth="463.025" >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Ribbon Grid.Row="0"
                Grid.Column="0" Margin="0,-23,0,23">
                <Ribbon.ApplicationMenu  >
                    <RibbonApplicationMenu Visibility="Collapsed"/>
                </Ribbon.ApplicationMenu>
                <RibbonTab Header="Contactos">
                    <RibbonGroup Header="Clientes">
                        <RibbonButton Label="Clientes" SmallImageSource="/Resources/CLIENTES16.png" LargeImageSource="/Resources/CLIENTES32.png"/>
                    </RibbonGroup>
                </RibbonTab> 
            </Ribbon>
        </Grid>
    
    </UserControl>
    At design it loads the Image in to the button not problem but when i run it it tells me:

    The application is in break mode
    Your app has entered a break state, but there is no code to show because all threads were executing external code (typically system or framework code).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width