Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Browsing all 18858 articles
Browse latest View live

Getting data from an object owned by another thread

I have a process that takes quite a long time, so I'd like to run it in the background, not on the UI thread. The process involves rendering the text from a text block that exists on a canvas to...

View Article


Custom sorting Datagrid

I have a Datagrid which has only one column and I want applying a custom sort on it. Currently, When I search the word "Clark", Datagrid displays filtered result as this:DavidClarkClarkDavidBut I want...

View Article


call method/function from a button click event not working

I have this collection as seen in the code below and I am trying to execute the InserData function to insert the data form the collection to my SQL DB table in the Button_Click_1 event and cannot make...

View Article

Change images within one image box on a timer?

Hi.  I'm very new to developing.  I am attempting to self learn.  I am currently working on a project for my kids using Visual Studio 2019 using WPF app in C#.  I have an image box that I want to use...

View Article

Image may be NSFW.
Clik here to view.

Why does the resource dictionary defined Height member not act in the...

A WPF UserControl has been defined. Because this control is used in a dozen places over many UserControls and there are many attributes to be set a ResourceDictionary file was defined. One of the...

View Article


Custom TreeViewItem?

I'm thinking about creating a custom TreeViewItem (or at least just extending TreeViewItem to implement some custom properties).  I want to add a checkbox and counter labels etc - my question is...

View Article

How can I force the ObservableCollection to notify change when a property of...

How can I force the ObservableCollection to notify change when a property of an item changes....I have a datagrid thats bound to an ObservableCollection..  ObservableCollection<SomeClass> a = new...

View Article

Image may be NSFW.
Clik here to view.

Get Index of Item in ObservableCollection not working

Need to get Index of Item in ObservableCollection not workingI just Need Index in ObservableCollection<T>.

View Article


Image may be NSFW.
Clik here to view.

Displaying PrintDocument dialog at center position

Hi,I have a WPF application which includes printing feature.After clicking "OK" from print dialog, below dialog is displayedProblem statement:  Above dialog is always displayed at Top Left corner...

View Article


MouseWheel Scrolling on content of DataGrid does not work when loading as...

Hi AllAm trying to load the MS DataGrid inside ItemsControl as one of the item. In this scenario, am facing an issue like on scrolling the ScrollBar using MouseWheel, the content of MSDatagrid get...

View Article

How to solve error - System.InvalidOperationException: 'The calling thread...

HI,I am facing error with the wpf application that I am working on, basically I would need the colour of the ellipse to change if the string contains OFF, please see my code. I do not understand this...

View Article

How to automatically put the focus on a WPF WebBrowser object in design mode

Hi, I'm trying to write a simple HTML editor. As a test project, the application is very simple. It hosts a single WebBrowser control in a grid. <Window x:Class="WebBrowser.Window1"...

View Article

WPF Topmost doesn't work as expected.

Hi,I have two Topmost app, if I run it 20 times, it might fails 1-2 times. I don't know why it doesn't work?Have you encountered with this experience before? .NET 4.0Title="OnScreen" WindowStyle="None"...

View Article


Designer Output DIfferent Then Running Application

I'm having an issue where the designer shows my application as it's intended to look, but when the application is running it displays with stuff cut off depending how I set it up. Current setup I'll...

View Article

Trigger Binding to Child Control Not Working

I have this on a WPF Window<local:TestControl><local:TestHost /></local:MediaPlayer> Classes defined like thispublic class TestControl : ContentControl { static TestControl() {...

View Article


Sorted ObservableCollection using a Binary Search

Hi, I nneded to use an Obverable collection that stays sorted. I know we can do this by overriding the InsertItem, and to make the search quickest possible, I wanted to use a binary search.I have the...

View Article

Partialy mixed up displayed content of DocumentViewer after loading different...

Hi everybody! If DocumentViewer (WPF Control) displays XPS file first time after the launch of my app, everything is OK! But if DV loaded another file with the SAME NAME as the previous file, the...

View Article


Image may be NSFW.
Clik here to view.

How to load an image form app resources?

My application folder looks like itI try to set the icon of mainwindow to this imagevar x = new Uri("Images/editor-icon-5.png"); Icon = new BitmapImage(x);but , when the progrom started I get this...

View Article

WindowsFormsHost and AllowsTransparency makes all win32 controls transparent

If I set AllowsTransparency=True on a form, all of my WindowsFormsHost controls become invisible. These controls obviously don't have an opacity property, it there anything I can do to get these...

View Article

Expression Blend Custom Item Template

I want to use a create a custom template VIA the Expression Blend interface (that is, not by manual typing in of stuff).I saw this done, a few months back. I forgot how...A class was created (ie...

View Article
Browsing all 18858 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>