xaml-designer

XAML Designer System.Runtime.Remoting.RemotingException

ⅰ亾dé卋堺 提交于 2021-02-17 20:28:58
问题 I'm encountering the following System.Runtime.Remoting.RemotingException error when I create a blank Windows 10 Universal Application... Following are event viewer screens... I have checked online for other solutions and have already done the following... Uninstall/Repair Visual Studio 2015 Update 1 Reset my Windows 10 PC 1511 update Cleared the Designer/ShadowCache folder Target environment has been set to x86/x64 Target framework set to 10240 Developer mode enabled Updated graphic drivers

XAML Designer crashes Object reference not set to an instance of an object

自古美人都是妖i 提交于 2020-01-11 11:41:40
问题 I'm using Visual Studio 2015 Community. So, I created a blank UW App (C++) and I wanted to start looking around, because that's my first time using the XAML Designer. However, with no changes to the code whatsoever, the designer won't load. The Designer returns an unhandled exception (System.NullReferenceException) - Object reference not set to an instance of an object. This is really weird, as the app compiles and runs fine. The designer gives me a fix ("Excluding project code from running

Xaml UI Designer is inactive for wpf projects in .net core 3.0

夙愿已清 提交于 2020-01-11 09:19:13
问题 I have updated Visual Studio 2019 to version 16.3 which can support .Net Core 3 stable version. After creating the first WPF app supported by .Net Core 3, the designer is inactive while the XAML designer is enabled in Tools=>Option=>XAML Designer. How is it possible to activate the UI Designer in Visual Studio 16.3? An image describing the problem visually has been attached to the question. 回答1: Try “Tools” > “Options” > “Environment” > “Preview Features” and check the option “Use previews of

Unable to cast object of type 'Castle.Proxies.XProxy' to type 'X' in WPF Designer

ⅰ亾dé卋堺 提交于 2020-01-03 09:16:12
问题 I've recently discovered the very useful design time attributes from Blend for a WPF component, which (among other things) allows you to set a DataContext only at design time. Awesome! Combined with the DesignInstance attribute, you can set a type to be automatically created and bound to during design time, allowing you to use the Visual Studio Designer with some context as to what your WPF component will actually look like at run time. Its really nice, and I wish it hadn't taken me so long

WPF XAML designer showing bound property names instead of property values

这一生的挚爱 提交于 2020-01-02 08:12:19
问题 One of my XAML files shows a strange behaviour in the XAML designer (but not during runtime): public class MyDesignTimeViewModel { public MyDesignTimeViewModel() { MyText = "abc"; MyInt = 5; } public string MyText { get { ... } } public int MyInt { get { ... } } } Then in XAML: <UserControl xmlns:d="http://schemas.microsoft.com/expression/blend/2008" ... d:DataContext="{d:DesignInstance vm:MyDesignTimeViewModel}" > <TextBlock Text="{Binding MyText}" /> <TextBlock Text="{Binding MyInt}" /> <

Can Visual Studio XAML designer handle font family names with spaces as a resource?

馋奶兔 提交于 2019-12-11 03:43:54
问题 This probably seems like a strange question, but I'm having trouble seeing a custom true-type font that I've loaded as a resource in my WPF application, and I'm wondering if it may have to do with the space in the font name. As described elsewhere (one of hundreds of examples), I've added the font to a folder Fonts in my application, and set it to Build Action = Resource . I'm able to reference the font (e.g., in a TextBlock ) with a simple FontFamily="Fonts\#My Font" . Unfortunately, the

Visual Studio 2015 Update 1 xaml designer not showing for UWP

a 夏天 提交于 2019-12-08 17:19:04
问题 Where disappeared XAML designer for Universal Windows app in Visual Studio 2015 Update1? It is working for wpf and window 8.1 apps and XAML designer is enabled in Tools->Option->XAML Designer 回答1: Change the Target Version to (10.0; Bulid 10240) 回答2: See the notification asking to update Windows - 回答3: I was having the same problem. Updated windows from windows update as instructed by the VS2015 notification and now it is fixed. 回答4: I assume that you are using VS2015 on an operating system

WPF designer doesn't run window static constructor upon starting up

好久不见. 提交于 2019-12-07 14:47:46
问题 When I load solution and there is an opened designer tab for some window, then this window static constructor is not executed. Perhaps my conclusion is wrong (because I am absolutely clueless how designer load things), but here is a test case: Create new WPF project. Create simple extension public class MyExtension : MarkupExtension { public static bool Test; public override object ProvideValue(IServiceProvider serviceProvider) => Test.ToString(); } Add to main window <TextBlock Text="{local

How can I debug XAML designer issues?

旧时模样 提交于 2019-12-07 09:08:21
问题 I'm developing a UWP app with Visual Studio 2015, and one of the things I want to do use some sample data at design time. Now, I've added a XAML file, set the build action as DesignDataWithDesignTimeCrateableTypes My XAML is really straight forward here: <local:Freead xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:MyNamespace.Uwp.Windows.ViewModels" xmlns:ad="clr-namespace:MyNamespace

WPF XAML designer showing bound property names instead of property values

淺唱寂寞╮ 提交于 2019-12-06 03:06:50
One of my XAML files shows a strange behaviour in the XAML designer (but not during runtime): public class MyDesignTimeViewModel { public MyDesignTimeViewModel() { MyText = "abc"; MyInt = 5; } public string MyText { get { ... } } public int MyInt { get { ... } } } Then in XAML: <UserControl xmlns:d="http://schemas.microsoft.com/expression/blend/2008" ... d:DataContext="{d:DesignInstance vm:MyDesignTimeViewModel}" > <TextBlock Text="{Binding MyText}" /> <TextBlock Text="{Binding MyInt}" /> </UserControl> In the XAML designer, the two TextBlock instances show the following content: MyText 0 The