WPF Binding multiple usercontrol to one viewmodel
My program is basicly a truck diary. I have a main page that is set up like a diary with days of the week listed. In them days of the week I have a custom control called TripUI which is setup in a listview and bound to a ObservableCollection from my…
How do i get back a listbox item after a window closes in C# WPF
I have 1 Listbox it takes items from TextBox, when an item is added to the listbox and the application is closed, upon opening the application the item added to the listbox will still be present. Use case: User opens application. User adds item…
[C#7.0 - WPF] - RichTextBox in a DataGridTemplateColumn with binding
Hi, I'm getting crazy about a RichTextBox to insert and bind to a DataGridTemplateColumn. I have As you can see, in a cell of the DataGridTemplateColumn I have four lines and what I would like is to have these lines colored in different…
WPF : Cursor not visible in text box first position in RightToLeft flow direction
Hi, I have tried to remove all margin value in TextBox by accessing inner element and set Margin as 0. With this value cursor not visible in RightToLeft direction first place. But working fine in LeftToRight direction. LeftToRight: RightToLeft: You…
How to reduce the size of a MSIX .Net Core 3.1 installation?
I have a WPF/.Net Core 3.1 app that I'm packaging as an MSIX for submission to the Store. If I publish the app as a sideloading .msixbundle then install it, the resulting directory is WindowsApps is huge. I assume that's all of .Net Core. But most of the…
Is there any UWP API/way available to detect/prevent hooking?
There are many tools available to do hooking eg: frida 29.html. But i didn't find any API or way to detect hooking . Is there any API or way to detect hooking in Universal Windows Platform(UWP)? If yes, can it detect all kinds of…
Issues using ResourceDictionary in a C# class library
I'm having trouble with reusing styles for WPF/XAML in my project. Just to give you some context. I am making a plugin for Revit, architectural/3D/CAD software used by many architects/contractors worldwide. To make a plugin for Revit, the Revit API…
ObjectAnimationUsingKeyFrames. Is it possible Canvases usage instead of Images?
Hello everyone, I'm currently using Storyboard type based on Image replacement. The code is below. It works fine, however there's a question arisen. Is there a way to replace images with canvases? Simple I failed to find such a variant in the Web. …
I have a problem with 'NoteViewer' in XML。
Dear sir, I managed to create a sample mentioned here with WPF App and Blank App (Universal Windows) http://musicengravingcontrols.com/en-US/Articles/Display?id=2 However, I have a problem here. Error Lists say "Unknown type…
Interaction DataTrigger doesn't work. Could anyone test this example. Perhaps I'm doing something wrong.
Hello everyone, here's a simplest code the purpose of which is animation launching from ViewModel. Some people claim that it is working code. There are not any mistakes. exceptions and it doesn't work. Could anyone test this example. perhaps I'm…
Is knowing Screen lock status from UWP app possible?
When my Universal Windows Platform(UWP) app is open and user locked the screen i want to know that screen is locked i.e., status of the screen lock. When the screen is locked the 'OnSuspending' method of App.xaml.cs will be fired. Now whatever the…
Drag, Cling, Dock a dialog
Hi, I am working on a WPF project where I will launch a new dialog inside a Window. User should be able to drag this dialog box to the edge of the window and if it is close enough, it should cling on to that side of the window like docking. User can…
Need help writing a UserControl
I trying to create a UserControl that will be added a variable number of times to a wpf window at run-time. This is my first attempt at a UserControl. I have two requirements for this UserControl: The content of the label is to be defined at…
Need to focus the grid which placed inside the Scroll Viewer on Mouse Click
Problem 1: I need to focus the Grid(UI Element) when it is placed inside the Scroll viewer. Code: <ScrollViewer> <Grid x:Name="RootGrid"> <Border Height="24" …
how to customize charts in WPF? (using System.Windows.Controls.DataVisualization.Charting)
i am working on LineSeries Chart . i want to have following customizations 1) the Box in which legends are shown i wan to remove it , as i have single series i dont want legends and box. in my case an empty box is there. please refer the image 2) how…
WPF IValueconverter is Not Firing When Click the radio button
Here is my xaml below. The DisplayUnitConverter is not firing when I click the radio buttons. Can someone assist me to see what I am doing wrong? I have initialize the Element name in the SpinEdit control to the Radio Control name. <Window…
How to maintain two slightly different XAML for two projects?
I have two projects in my hands that are used in different scenarios. There are many XAML pages in these two projects, and some of page in one project is copied from another project(old version) and modified namespace, added some new things. Now I am…
WPF - Auto width for FlowDocument's content
Hello, I'm having a hard time trying to make a RichTextBox's content in my app auto-sized. Specifically, I want the content inside my RichTextBox to be of automatic width (with a MaxWidth boundary), and Wrap when the width exceeds the available space. …
Why this error when doing an image conversion
I am trying to convert a BitmapImage to a Byte() with the following code: Dim ic As New ImageConverter Dim bts() As Byte = DirectCast(ic.ConvertTo(clsImage, GetType(Byte())), Byte()) The error message I get is: > Unable to cast object of type…
XAML > Binding SelectedValue to a concatenation of 2 properties
Hi, I've a Person class public class Person { public string location; public string name; ... } ...and a list of Person List<Person> list1 = new List<Person>() { new Person() { location = "Chicago", name =…