generic type in xaml
Hi <DataTemplate DataType="{x:Type vm:MyViewModel1}"> <StackPanel DataContext="{Binding}"> <!--template--> </StackPanel> …
enum in xaml in MVVVM
hi <MenuItem Header="StepOne" Command="{Binding CurrentStepCmd}" CommandParameter="{x:Static data:Steps.StepOne}"/> <MenuItem Header="StepTwo" Command="{Binding CurrentStepCmd}" …
WPF behavior when Windows OS is locked
What happens to WPF window when Windows OS is locked? How WPF behaves? What happens to rendering is it suspended or something else? How does the OS understand what needs to be resumed when we unlock windows user session?
In WPF which is better MVVM way of loading an userControl/customcontrol from a different library project into mainWindow XAML
there is seperate library for usercontrol which has to be loaded in another exe console project which is better approach for the same 1. using contentcontrol and set the content to the user control 2. refer the library in the mainwindow.xaxml and add the…
change ContentControl Content based on datacaontext
hi i'm trying to change ContentControl.Content at run time based on ContentControl.DataContext, so at run time i change ContentControl.DataContext Source property and i want the ContentControl.Content to be changed based on the…
Binding Failures in WPF
I get endless binding failures: (: 'System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''.…
Data insertions without my request EF6
My project was created on VS17, it is on the 4.6.1 framework. I use Entity Framework 6 in database first. We switched to VS19 and this is the first time I debugged the project on it. My pc crashed and showed me a blue screen while I was debugging. …
ClickOnce publish .net5 with .netstandard library fails
I have a WPF .net5 application which has 2 reference class library projects which are .netstandard and .netcore3.1. The application compiles and runs; however, Clickonce fails to publish it with the following unhelpful info: Publish has encountered an…
WPF - How to set a dependency property of a control from a nested templated control's trigger
I have a subclassed ContentControl (MySpecialContentControl) and added to it a DP called "mySpecialDP". In this control's Style template, there are a few other controls in the templated "ResizeDecorator" (also subclassed controls),…
How to use a trigger to set the width of user control according to the numer of items in ItemsControl?
I have a user control that I create to show months of a calendar. I would like to set the size of the user control of the month according to the number of items that I have, the number if items it is the numbers of calenders to show. This is the xaml if…
WPF application and remote control
Hello everybody, I have a very subtle problem. I have a WPF application that works perfectly in Desktop A and in Desktop B. The application runs with .NET 4.6 When I connect to Desktop B via remote desktop to Desktop A, the application works more or…
How to bind ControlTemplate's child property to other element with xaml?
Here i have a control template which has label as its child. Now i want to get properties of that label like text or width. How to achieve this with xaml? <ControlTemplate> <Label x:Name="MyLabel" Text="This Is a…
VB.NET WPF Datagrid Cell Background color based on value.
VB.NET WPF Datagrid Cell Background color based on value. I need help with conditional formatting of individual cells within a datagrid based on the value of that cell. I can't seem to find the right answer elsewhere. Can someone provide examples? …
How to get Label Width in Xaml?
I want to set TabWidth equal to the width of label + some padding. (I am new to xamarin.) I tried below line but it prints -1. TabWidth="{Binding Source={x:Reference TabLabel}, Path=WidthRequest}" (Here, tab width is property of tabview…
Exception threw during launch of Apllication : "An exception was thrown during the initialization of'System.Windows.Data.ObjectDataProvider'."
Hi all, I am getting an exception when launch application as below mentioned. Exception: "An exception was thrown during the initialization of'System.Windows.Data.ObjectDataProvider'." I have use the ObjectDataProvider at XAML side inside the…
VSIX Project - Properties Tool window extension
Hello, There might be something wrong with the way I search for things but here is my problem. I'm looking for a way to implement a custom editing tool within the properties tool window in the Visual Studio editor. I've been lookig through several…
clickonce, VS 2017 and WPF application. crash issue
We have developed a WPF application on VS 2017 (.Net Framework 4.5), and deployed it into an IIS server using ClickOnce. Users access to application URL, and the executable package is deployed to their computer. Everything works, but sometimes users had…
The 'ismouseover' attribute stays in 'enteractions/exitactions' mode , how do I change the focus of the button ? please note the image (GIF) that shows how it works.
Hi to all. First of all I am sorry for my language grammar because my first language is Persian (Iran). I created a button that has a series of effects and these effects work properly when the WPF window opens. But when the PreviewMouseLeftButtonUp…
how to create PDF from an image in xamarin?
Hi, Greetings! Can some one tell me how to create a pdf from an image or screenshot of the Xamarin application? I am having a billing page which I am taking a screenshot. But the same needs to be written into a new PDF. Regards, Mahesh B.
When the SelectedItems attached property stops to work when I change the tab?
I have a view and a view model. I have a datagrid that when I select a row, a textbox shows the value of the row. This is just to show if the selectedItems it is fired. it works fine, but if I change to the other tab and back, it stops to work. I am…