1

I'm using Modern-UI and I have a simple ModernWindow with a UserControl as its default content and three other UserControls as its TitleLinks.

What I want to do is to have a fixed Frame at the bottom of the window (Binded to a dependency property of type Exception) so that when user navigates through these links, this exception frame can stay still. The problem is it doesn't show anything when I do this:

<mui:ModernWindow x:Class="SBSA.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mui="http://firstfloorsoftware.com/ModernUI"
        ContentSource="/DefaultPageView.xaml"
        Height="650" Width="925">

        <DockPanel>
            <mui:ModernFrame Content="{Binding Error}" DockPanel.Dock="Bottom"/>

            <mui:ModernWindow.TitleLinks>
                <mui:Link DisplayName="Page1" Source="/Page1View.xaml" />
                <mui:Link DisplayName="Page2" Source="/Page2View.xaml" />
                <mui:Link DisplayName="Page3" Source="/Page3View.xaml" />
            </mui:ModernWindow.TitleLinks>
        </DockPanel>

</mui:ModernWindow>

I know I can implement it inside each UC but I want to know if is there a better way to customize ModernWindow.

Edit

This will work but it does not have a fixed panel showing the desired error message:

<mui:ModernWindow x:Class="SBSA.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mui="http://firstfloorsoftware.com/ModernUI"
        ContentSource="/DefaultPageView.xaml"
        Height="650" Width="925">

        <mui:ModernWindow.TitleLinks>
                <mui:Link DisplayName="Page1" Source="/Page1View.xaml" />
                <mui:Link DisplayName="Page2" Source="/Page2View.xaml" />
                <mui:Link DisplayName="Page3" Source="/Page3View.xaml" />
        </mui:ModernWindow.TitleLinks>

</mui:ModernWindow>
Bizhan
  • 16,157
  • 9
  • 63
  • 101
  • How are you setting your DataContext for this window? Is the `Error` property a string, or is it the UserControl instance itself? Need a little more info to help you out. – Mark Richman Jun 10 '15 at 19:28
  • Actually it's a DependencyProperty (type of `Exception`) inside the view model of the ModernWindow. its value is typically changed in a catch() statement. The problem is I can't customize the ModernWindow's contents in order to add a DockPanel. – Bizhan Jun 14 '15 at 13:24

0 Answers0