xaml-designer

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

老子叫甜甜 提交于 2019-12-06 02:35:02
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:My}" /> and static MainWindow() { MyExtension.Test = true; } Now compile it ( F6 ), TextBlock should

How can I debug XAML designer issues?

百般思念 提交于 2019-12-05 16:20:44
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.Classifieds;assembly=LocalAngle.Uwp" ItemName="Java books" Description="Free to anyone that wants them. A

Visual Studio 2013 update 3, Designer won't load

旧巷老猫 提交于 2019-12-04 21:39:16
问题 I have the following situation. I installed Visual Studio Update 3 last night. Now I have a problem that when I open my projects (Universal Apps) which i have done while i had update 2, my designer won't load and it throws an exception: Does anyone knows how to solve this? I guess this is not a bug because probably everything was tested by Microsoft, and this is not RC update. Im about to delete this update if i don't figure out the solution. I'm guessing that it might have to do with xaml if

Visual studio 2012 - silverlight - XAML designer - Insert grid row before/ after

浪子不回头ぞ 提交于 2019-12-04 03:58:34
问题 Just switched to visual studio 2012, and I can't figure out how to insert a new row into a silverlight grid through the xaml designer. In visual studio 2010, we could easily insert rows and columns into our silverlight grid just by left clicking > rows > insert before . When we did this it would automatically re-number all the rest of the controls' row numbers. I don't want to have to re-number every control by hand, has this super convenient feature been removed from 2012? Or is there some

Visual Studio 2012 Not Recognizing Xaml Files, Design View Broken

故事扮演 提交于 2019-12-03 18:05:37
问题 Design View for Xaml on Visual Studio Professional RC 2012 used to work for me. But suddenly stopped for no reason I can figure. Visual Studio 11 No longer Recognizes Xaml Files. In properties, it treats XAML files like XML. In solution Explorer it recognizes it as a xaml file Right Click -> Design View opens a new Xaml code page Controls Toolbox shows nothing My OS is Windows 7 x64. I have applied all updates up to July 2012 to VS11 I have tried Repairing Visual Studio & Resetting Settings

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

我只是一个虾纸丫 提交于 2019-12-02 04:17:13
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 in the design view can improve the stability of the XAML designer...."), but this doesn't resolve the

Microsoft Ribbon doesn't render in Designer

若如初见. 提交于 2019-12-02 01:56:59
问题 I'm using thbe Microsoft Ribbon for WPF (System.Windows.Controls.Ribbon) and VS2015. Since I removed unnecessary depencies from my project (like Dynamic Data Display etc, things not related to the ribbon) it does not render correctly in the Designer anymore. All RibbonButtons get rendered as usual buttons and so on. I used the Clean Solution option and also rebuild multiple times, without sucess. While execution everything is fine, just the designer can't handle the ribbon anymore. What could

Microsoft Ribbon doesn't render in Designer

可紊 提交于 2019-12-01 22:25:14
I'm using thbe Microsoft Ribbon for WPF (System.Windows.Controls.Ribbon) and VS2015. Since I removed unnecessary depencies from my project (like Dynamic Data Display etc, things not related to the ribbon) it does not render correctly in the Designer anymore. All RibbonButtons get rendered as usual buttons and so on. I used the Clean Solution option and also rebuild multiple times, without sucess. While execution everything is fine, just the designer can't handle the ribbon anymore. What could have caused this strange behaviour? This is how my ribbon looks now in the designer: And this is how

How to kill process that may not exist on prebuild step in Visual studio?

血红的双手。 提交于 2019-11-30 11:49:34
Problem is if this process doesn't exist, build fails. I try to write something like this tasklist /nh /fi "imagename eq XDesProc.exe" | find /i "XDesProc.exe" && ( TASKKILL /F /IM "XDesProc.exe" ) || ( echo XAML designer is not running ) But ERRORLEVEL is equal to 1 too and bild fails if XDesProc.exe is not running. You could use a conditional test on the PID to avoid this: taskkill /f /fi "pid gt 0" /im xdesproc.exe 来源: https://stackoverflow.com/questions/15748355/how-to-kill-process-that-may-not-exist-on-prebuild-step-in-visual-studio

How to kill process that may not exist on prebuild step in Visual studio?

跟風遠走 提交于 2019-11-29 17:10:33
问题 Problem is if this process doesn't exist, build fails. I try to write something like this tasklist /nh /fi "imagename eq XDesProc.exe" | find /i "XDesProc.exe" && ( TASKKILL /F /IM "XDesProc.exe" ) || ( echo XAML designer is not running ) But ERRORLEVEL is equal to 1 too and bild fails if XDesProc.exe is not running. 回答1: You could use a conditional test on the PID to avoid this: taskkill /f /fi "pid gt 0" /im xdesproc.exe 来源: https://stackoverflow.com/questions/15748355/how-to-kill-process