question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Design-time binding does not work with caliburn.micro 2.0.2

See original GitHub issue

I want to use design-time binding in WPF with caliburn.micro version 2.0.2. I made simple test project and add neccessary settings for that:

<Window x:Class="CaliburnTest.MainView"
         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" 
         mc:Ignorable="d" 
          xmlns:caliburn="http://www.caliburnproject.org"
          xmlns:caliburnTest="clr-namespace:CaliburnTest"
          d:DataContext="{d:DesignInstance caliburnTest:MainView, IsDesignTimeCreatable=True}"
        caliburn:Bind.AtDesignTime="True">
<Grid>
  <TextBlock Name="Test" Width="150" Height="50"/>

As a result I dont see value of textblock in design-time, but I see it after app starts. Could someone tell me what I am missing here? Maybe some additional settings?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
QuantumDevelopercommented, Mar 27, 2015

Everything is working - thanks. The problem was that Xaml designer works correctly in design mode only in release build configuration and not in debug unfortunately.

0reactions
sevenatecommented, Mar 27, 2015

Try <TextBlock Name="Test" caliburn:Bind.AtDesignTime="True" Width="150" Height="50"/>, i.e. on element level instead of root Window.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Design-time binding does not work in caliburn.micro 2.0.2
I want to use design-time binding in WPF with caliburn.micro version 2.0.2. I made simple test project and add neccessary settings for that:...
Read more >
Design Time support
Design Time support. Enabling Caliburn.Micro inside the Visual Studio designer (or Blend) is quite easy. You have to set a Designer-DataContext and tell...
Read more >
Using a Design-Time ViewModelLocator With Caliburn.Micro
I now use a `DesignTimeViewModelLocator` class for binding sample data in the designer. Here's how it works: ## The XAML Side. Markup. d: ......
Read more >
CSLA Forum Archive Index
01 May 2013 - How do you bind ComboBox's ItemsSource with Caliburn Micro? 01 May 2013 - Extending BusinessRules to Support Client-Side Validation...
Read more >
Caliburn.Micro 4.0.212
A small, yet powerful framework designed for Xaml platforms, Caliburn.Micro implements a variety of UI patterns for solving real-world problems.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found