how to use DesignInstance with Caliburn.Micro

前端 未结 1 853
忘了有多久
忘了有多久 2021-01-21 10:24

I am using Caliburn.Micro

I have this WPF View that in design time uses sample data successfully on basic properties like firstname etc but can\'t won\'t find the view f

相关标签:
1条回答
  • 2021-01-21 10:41

    Don't you need cal:Bind.AtDesignTime="True" on your user control.

    <UserControl x:Class="NonRepositoryItems.Reviewer.AddressView"
             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:SampleData="clr-namespace:NonRepositoryItems.SampleData" mc:Ignorable="d" 
              d:DataContext="{d:DesignInstance SampleData:SampleAddressViewModel, IsDesignTimeCreatable=True}"
             cal:Bind.AtDesignTime="True">
    
    0 讨论(0)
提交回复
热议问题