This works fine, and correctly inserts non-breaking spaces into the string:
<TextBlock Text="Non Breaking Text Here"></TextBlock>
But what I really need is to replace spaces with non-breaking spaces during data binding. So I wrote a simple value converter that replaces spaces with " ". It does indeed replace spac...
I would like to set mandatory field backgrounds are red and others are green. So I try to implement below. But I could not control ValueConstraint Nullable property with trigger. Could you help please ?
<Window x:Class="TriggerGirilmesigerekenalanlar.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmln...
Hi,
I have a LOT of MenuItem(s), and I want to be able to change their "Content" so that it displays in the program. When I load up the program, their "Content Name" is set in a Setter I created.. but the only problem is that I have almost a hundred MenuItem objects, and I need their display names in the program to be different (not the...
How can I efficiently calculate the sum of all pixels in an image, by using a HSLS pixel shader? I'm interested in Pixel Shader 2.0, that I could invoke as a WPF shader effect.
...
Hi !
I'd like to ask if there is any possibility to draw on WPF Canvas with some kind of a Graphics type providing methods like: DrawLine, DrawPath etc.. (as it was in .NET 2).
I know there's a lot of stuff like storyboards etc.. but I'm planning to do all the drawing in code behind and to have just 1 Canvas in WPF without any child ...
I have the following question: I have a Boolean variable in a configuration file. If it is true I want a property in textbox control to be setup according to the value of that variable.
Try the solution above but it does not work. What am I doing wrong?
This is a fragment code:
bool isKeyboardAvtive = true; //read from configuration fi...
We have a datasource that has a multiple nested classes. In general, there's a datastore which represetns a calendar year. It contains a collection of months, and each month contains a collection of days.
Now, the problem is that we have a dozen or so properties that calculate total horus and what not for a month, half a year, and the en...
I'm working in some code , using wpf and starting to use mvvm. So far i have no problem, when i have one element and I have to show the values of it in the screen (binding of the specific name of the property). But now, i have to work with a property list , not knowing the names of it. So I created a class, named GClass, that only have t...
Hey, I have got an UserControll with a DependencyProperty called "Risikobewertung" whitch has the own Datatype "RisikoBewertung"(Datatype created by LINQ). So in my Controll I try to bind the Fields of RisikoBewertung to the TextBoxes on the Controll, but It won't work. I hope you can help me, and tell me why ;)
Code:
UserControl.xaml...
Using WPF, I want to apply a converter within the binding of the Text property within all my TextBoxes.
The following works for a single TextBox:
<TextBox Style="{StaticResource TextBoxStyleBase2}"
Text="{Binding Text, Converter={StaticResource MyConverter}}">
</TextBox>
However, our T...
Hi,
I have a LOT of MenuItem(s), and I want to be able to change their "Content" so that it displays in the program. When I load up the program, their "Content Name" is set in a Setter I created.. but the only problem is that I have almost a hundred MenuItem objects, and I need their display names in the program to be different (not the...
Hi,
I'm considering to use WPF for an application running on an iX104 (unfortunately I don't have one of those yet).
Do you guys think that this combination would be efficient enough? Or is WPF just to slow for such a machine, so better stick with WinForms?
Relevant specs of the iX104:
Intel Pentium U2500 CoreDuo 2x 1.2 GHz
1 GB RAM, ...
How could I implement a bleach bypass shader effect for WPF?
I'm also interested in the possibility of implementing the first two Tehnicolor Film Processes, or any variety that would result in an old film look.
...
I want to place a 3D image into a scene base on world/global coordinates. I have an image of a scene. The image was captures at some global coordinate (x1, y1, z1). I am given an object that needs to be placed into this scene based on its global coordinate (x2, y2, y3). This object needs to be projected into the scene accurately simi...
I want to present up to 300 strings (just a few words) in a Viewport3D - fast! I want to render them on different Z positions and zoom in and out fluently.
The ways I have found so far to render text in a Viewport3D:
Put a TextBlock in a Viewport2DVisual3D.
This guy's PlanarText class.
The same guy's SolidText class.
Create my own 2D ...
I have an Adorner in XAML that I'm using for ErrorValidation. Basically I have a grid that I want to display on two conditions (if the "AdornedElement" IsFocused or IsMouseOver).
Below is a code snippet where I'm binding - successfully - to the IsFocused of the AdornedElement, but as you can tell that only solves 1/2 the conditions. N...
I want to show the wait cursor before my WPF application, composed using CAL, fully loads.
In the constructor of the main window, I have the following code:
public MainWindow([Dependency] IUnityContainer container)
{
InitializeComponent();
C...
I want to bind a user control (View) to a ListBoxItem. The ListBox is bound to a collection of ViewModels. I have set the ListBox's ItemTemplate as so:
<ListBox.ItemTemplate>
<DataTemplate>
<View:ContactView/>
</DataTemplate>
</ListBox.ItemTemplate>
But all I get are blank ListBoxItems. I can click on the...
I'm writing a media player for enthusiasts with large collections (over 100,000 tracks) and one of my main goals is speed in search. I would like to allow the user to perform a Google-esque search of their entire music collection based on these factors:
Song Path and File Name
Items in ID3 Tag (Title, Artist, Album, etc.)
Lyrics
What...
I have a function that is being called when the user is typing in a search box. I want to wait for the user to finish typing before I actually execute the function. I know how to easily accomplish this in JavaScript with timeouts, but how would I go about doing the same thing in C#? Also, how long should I wait before I assume the user i...