# .NET and More > WPF, WCF, WF >  WPF ribbon

## Mike Storm

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

----------


## Mike Storm

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



```
<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,



```

<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).

----------

