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),…
![](https://techprofile.blob.core.windows.net/images/NhkrylFCqEiUzgd3au5ONw.png?8D7FAD)
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? …
![](https://techprofile.blob.core.windows.net/images/NhkrylFCqEiUzgd3au5ONw.png?8D7FAD)
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…
![](https://techprofile.blob.core.windows.net/images/JiX-lf2_BgAAAAAAAAAAAA.png?8D8532)
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.
![](https://techprofile.blob.core.windows.net/images/IGm5jP2_AwAAAAAAAAAAAA.png?8D9CB7)
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…
Serializing Microsoft.Toolkit.Mvvm ObservableRecipient/Observable Objects
I have a WPF application that is trying to follow the mvvm pattern. The model objects are held in ObservableCollections, as properties of the viewmodel. In previous use, I subclassed from the ObservableCollection, and inherited from that; thereby…
How can I center align text with hyperlinks in it?
Hi. How can I center align text with hyperlinks in it? I need to have the some text below, and with the XAML I got it's currently not centered. In fact, Horizontal Alignment does not seem to have any effect. Hyperlinks are working fine, however. This…
Memory increase when using RenderTargetBitmap on 32 bit png
We are encountering a strange problem when creating preview screenshots of UserControls within our application. If a user control contains a 32 bit png image, the memory used for the image creation is not released afterwards, while there is apparently no…
Cannot add content to object of type 'Microsoft.Toolkit.Wpf.UI.XamlHost.WindowsXamlHost'
Hi Q&A, The error MC3028 'Cannot add content to object of type 'Microsoft.Toolkit.Wpf.UI.XamlHost.WindowsXamlHost'' appears when trying to add any control (in the conventional manner) to the StackPanel. I am new to xaml islands; however, there…
Hide Tab From Tabbed Page XAML
Hi Guys, I have a Xamarin.Forms Project With a Navigation page witch contains a TabbedPage with 3 ContentPages Inside Descibed in a XAML File. But depending on a bool I have to hide or not a tab of the tabbedPage. I used the IsVIsible…
Question Regarding WPF and BAML
As I know, WPF use BAML(Binary Application Markup Language) as a precompiled XAML. My question is.. BAML resource is finally injected to Application's dll/exe file? it cannot be separated from each other?
![](https://techprofile.blob.core.windows.net/images/NhkrylFCqEiUzgd3au5ONw.png?8D7FAD)
Convert.ToDateTime throws exception when language is set to Arabic(SaudiArebia)
Hi, I am changing UI language based on user selection as below Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(ChangeLanguageTo); Thread.CurrentThread.CurrentUICulture =…
Dependency Property
how to use Dependency Property in WPF ? How to use it in MVVM ? a sudo code is much more helpfull than theory ? I have read lot of articals but non is given best explanation.
![](https://techprofile.blob.core.windows.net/images/319aafad7757470c87140361047582b7.png)