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?
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.
WPF MediaElement throw System.Runtime.InteropServices.COMException (0xC00D1197): Exception from HRESULT: 0xC00D1197
When the test server went from rest to wake up, an error occurred when the client played the video file on the test server. the following exception: Cannot find the media file. ---> System.Runtime.InteropServices.COMException (0xC00D1197):…
I wonder why Xamarin.Froms does not support *.baml in terms of xaml loading like WPF.
Hello. As I know, Xamarin.Froms does not use a separated complied xaml file like *.baml. Instead, It just compile xaml to IL code and inject such IL codes into app's exe/dll. I wonder why Xamarin.Froms does not support such kinda of feature to load a…
what is exactly XAMLC ?
As far as I know, Xamarin.Froms support pre-compilation of xaml using xamlc. I've read xamc compile xaml to IL and merge it to App's DLL/EXE. In contrast, WPF, UWP support pre-compilation of xaml using BAML as a resource with App's DLL. Question…
How to Migrate a WPF XAML Application to .NET 5.0
I would like some help converting a WPF XAML application (Microsoft's sample app: ExpenseItIntro) to .NET 5.0. I have already run the Portability Analyzer, which says it is 100% compatible. I have already been able to convert Console and Windows Forms…
How to Scale WPF application according to screen resolution?
I make a WPF application in .Net Framework 4.7. I developed this application on my Laptop which has full HD resolution (1920*1080). My problem is when I run my application on a low resolution monitor (1366*768), my application don't scale up according to…
c# WPF Listbox databinding and getting the row's data item from a click event.
I have a WPF Listbox where the ItemTemplate is made up of a TextBlock and 2 custom hyperlink controls. When a user clicks on one of the hyperlink controls they fire a click event. In this even I need to get data item bound to that listbox row, but I…
Why is my DataGridComboBoxColumn not populated
Given the XAML block below, the ComboBox named "Populated" shows the items define in the ItemSource when expanded, whereas whilst the DataGridComboBoxColum named "NotPopulated" uses the same ItemSource shows nothing when expanded.…
How can i change this code for WPF Datagrid
Hi guys I made this code for win forms datatgridview. I want to use it in WPF Datagrid but in WPF Datagrid i can't use datagridview.Rows.Add. Can someone help please Private Sub fill_plan() EmployeeGridView.Rows.Clear() Try Dim i As…
When i change GroupBox style , GroupBox header property becomes hidden?
Hi to all First and foremost, I apologize for my grammatical errors; my first language is Persian (Iran). I want to change GroupBox style but when i do this i can't show GroupBox header and Groupbox header becomes hidden. I want a GroupBox…
More time delay occurs when getting attached properties using MarkupWriter
I have trying to get the attached properties of a custom class which contain 1000 plus properties using MarkUpWriter. But when using MarkUpWriter for retrieving attached properties it causes more time delay. Please find the sample and screenshot…
Web Cam Light is not closing
In my WPF c# application,there is a form using web camera for taking picture( forge.video).After closing the form it will not close the light. Below mentioned code is for stopping the webcam.Please help public void Window_Closing(object sender,…
Can XAML “deduce” inheritance from C#?
I wonder if XAML is somehow able to "deduce" the C# inheritance. Let me explain: I have these two C# classes: public class AStyleSelector: StyleSelector { public Style aStyle { get; set; } public override Style SelectStyle(object item,…
C# + AddDirectorySecurity(pathofprog, addeduser, FileSystemRights.FullControl, AccessControlType.Deny) - Still able to execute exe's within
Hi I have managed to get the code running and it is working fine, I see that the user is added into the acl and the permission is set to deny, however, I noticed that at times, for certain programs, I am still able to execute the exe's within the…