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

Getting Pixel Information from a BitmapImage

I need to get an array of pixels from a BitmapImage. I need to know the Argb values of each individual pixel, as well as the x-y coordinates of the pixel within the BitmapImage. Is there a way of doing...

View Article


Receiving FailFast in FlowDocument w/ certain line indent settings

Developing a desktop WPF (.NET 4) application using VS 2010 SP1, running on Windows 7 Ultimate. We are using the FlowDocument to display formatted data.When the user has finished entering the data in...

View Article


Datagrid Lost Focus Brush

When datagrid loses focus to another control, the brush for the selected row is light grey.How can I grab and set that brush? I'd like to set it to the same color as when it's selected.Example: Show...

View Article

Threading and WPF - how does it work?

Can anyone explain or give a pointer to an explanation of the threading in C# / WPF?Especially I'd like to have a non-object oriented explanation about background worker.That is: I'd like to have an...

View Article

Error of Layout WPF

I have this SurfaceListBox:<my:SurfaceListBox Margin="10" x:Name="grid1" VirtualizingStackPanel.IsVirtualizing="True" Style="{DynamicResource SurfaceListBoxStyle1}"...

View Article


ObjectQuery by reflection

Hello guys!   I'm trying to do something like this with reflection and no luck...this.EFMODELINSTANCE.Entry((PERSON)instance).Collection(d => d.somePersonProperty).Query().Count();what i'm trying to...

View Article

How to bind the Image Source property of a XAML element to an individual List...

I have a List<> object which changes dynamically (let's call itmyList), and I have a property called "currentIndex" to track the visibility of the current item on the screen for the user.myList...

View Article

How to handle duplicate Drawing Visuals/Icons to save memory

For some background. I have a group of DrawingVisuals that represent a vehicle. Each vehicle consists a single "main" DrawingVisual with several child DrawingVisual's each with one polygon.In this way...

View Article


Get Token value from data template items

I am tryin to get Datacontrol value (TextBlock) from code behind I have xaml like <code>    <UserControl                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"...

View Article


Bind dataset to datagrid with combobox column

I have a datatable with distinct rows like: col1,col2,col3,col4 A,B,C,E A,B,C,F L,M,N,O P,Q,R,S P,Q,R,T P,Q,R,U Now, I want to bind the above to a datagrid containing 4 columns, with the 4th column...

View Article

Confusing Question About MVVM and Window Closing Event (Setting Cancel to...

Strictly adhering to MVVM, I'd like to cancel the closing of a window when the user clicks the "X" or standard Windows close button.The ViewModel is as follows:private...

View Article

WPF Custom Event Handling

Hello Everyone,I'm trying to do what I feel like is very basic but I haven't found anything obvious as a solution.Using MVVM, I have a Window - MainWindow.xaml, with VM MainWindowViewModeland I have a...

View Article

WPF DataGrid "loses" column sortdirection binding when rows are refreshed...

This is driving me nuts and I spent a few days trying to fix it:I have a WPF DataGrid that gets paged results from the database (custom implementation, not using anything from toolkit or third party)....

View Article


How to close View from ViewModel without using code behind?

My application is showing a View as though it were a modal dialog. This view can be closed as a result of the user clicking on an OK or Cancel button. Because the OK closure has work to do in the VM...

View Article

Shapes.Path MouseOver Event

Hello,I am editing the a xaml style file that has several System.Windows.Shapes.Path s defined as part of a style.  I would like to make them bold or change color on mouseover.  However, I don't have...

View Article


Added few buttons on expander header...Buttons are not clickable

Added few buttons on expander header...Buttons are not clickable...I have done like below...Created a DataTemplate<DataTemplate x:Key="ExpanderHeaderTemplate"><StackPanel...

View Article

StringFormat XAML add dashes to string value

Is it possible to format a number like 123456789000 to 123-456-789-000 using stringformat in xaml (wpf)? It seems most examples I see are for formatting dates and numbers, not strings. Here are some...

View Article


WPF Apps stop responding to touches while mouse continues to work

WPF applications stop responding to the touchscreen (we are using simple button click events) after some period of time (not consistent) but WILL respond to mouse clicks and the non-WPF applications...

View Article

Is it possible to unfocus an element wihout having a second object inside the...

Heyi dont know how to release the focus of a TextBox, if the textbox is the only child inside a window, what can retrieve the keyboard focus. Is there a method????

View Article

Why the UI stands still if i open a new Window??

Hey, i'm trying to undertsand why evry time i open a new Window from inside of my application the hole UI will stands still?So im trying to use a second thread with Dispatcher.BeginInvoke but the...

View Article
Browsing all 18858 articles
Browse latest View live


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