Blend 3 during development cannot find my converters / resources. (WPF)

I am having problems using Blend with my visual studio solution.

In Runtime and at compile time, everything is just fine.

As you can see in the picture, Blend encourages me to create a project, but this does not change the situation, even after successful assembly, rebuilding, cleaning and assembly, it is still the same, the user interface is blocked from the designer.

Any ideas?

alt text

EDIT: typos fixed, the problem persists.

Converter Code:

namespace BlendTest
{
    public class TestConvert : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return ((bool)value) ? Visibility.Visible : Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }  
}      



<Window
  x:Class="XP2Win7.UserInterface.ImageViewer.MainView.MainWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:BlendTest"
  WindowState="Maximized"
  WindowStartupLocation="CenterScreen"
  Background="Transparent"
  Title="Test">
    <Window.Resources>
        <local:TestConvert x:Key="TestConvert"/>
    </Window.Resources>
    <Grid x:Name="RootLayout" >
        <TextBlock Text="Hello" Visibility="{Binding IsMargol, Converter={StaticResource TestConvert}}" FontSize="48" FontWeight="Bold" />
    </Grid>
</Window>

Thanks ariel

+3
source share
4 answers

Well, so far the cause of the problem is still unknown.

The solution to the mess was as follows:

  • .

  • XmlnsDefinition , .

  • .

Voilà.

Ariel

0

, XAML:

Alubm Album BlentTest BlendTest

, , , , "" .


Edit:

, , , XAML ( ). , XAML , ( BlendTest) . :

xmlns:local="clr-namespace:BlendTest;assembly:BlendTest"

( ), , .

0

: reset " " " ".

0

?

bin/x86/Debug to bin/Debug . , Target ​​ "x86" . , "x86" "", .

VS, .csproj , , "". , " ", "x86" . , , .csproj, 'x86'.

:

  • VS
  • Right-click and edit the .csproj file.
  • Make sure the "Platform" is set to the correct one.
0
source

Source: https://habr.com/ru/post/1716618/


All Articles