Hi Guys,
I'm writing a small Login dialog, and have embedded a banner at the top of the dialog for aesthetic reasons. All went well, except that by default, WPF anti aliases the entire image, making the text that was contained within it frustrating blurry.
After a bit of Googlin', the first few pages of results showed that it's common ...
Hi,
I am showing a movie on my application, and i want the application to only play it once. And when its done playing i want to enable some buttons (play, rewind, watch again etc...) but is there any way i can get an event when the movie has finished - or anything that would accomplish this scenario?
Cheers,
...
Hi !
I'm trying to make a listbox that display pictures from internet. The items are provided by binding itemsource to a model that contain the URL of the image and some other properties (title, desc, etc...).
Unfortunately, the list is very slow to load because WPF is trying to download all pictures from the web before showing the lis...
The XAML below does the following: when the mouse is over a textblock, its text will enlarge, when the mouse leaves the textblock its text shrinks. When the mouse is clicked the textsize freezes.
This works as expected when the style of the Textbox is directly set to the SwellingTexblock resource. However, when the style is set to the S...
I have a ListBox. It has internal ScrollViewer, so I can scroll ListBox content with mouse wheel. It works fine until I set item template that contains another ListBox (in fact, I have 4 nested ListBoxes =)). Problem is that internal ListBox's ScrollViewer steals wheeling event. Is there any easy way to prevent this behavior?
I had Li...
i have an ICommand that I want to fire (make the execute go) from code; how do I do this?
...
Hello,
It's simple enough to define an image in xaml and move it around, but how would I do this programmaticly? I define my Image like this:
System.Windows.Controls.Image imgpanel = new System.Windows.Controls.Image();
imgpanel.Source = loadBitmap(capwin);
And I'd like to be able to set it on my window. How would I got about this?
...
If i set sizetocontent to widthandheight, then WindowStartupLocation="CenterOwner" does not work properly. Instead of the center of the new window to be at the center of its parent owner, it looks more like the top left hand corner of the child window to be at the center of the parent.
If i remove sizetocontent then all is ok.
What is wr...
I am struggling with the learning curve on WPF data binding and could use an example. Bonus points for those that answer the question and link to an article that helped them "get" WPF data binding.
I am trying to bind a custom Table object with a WPF DataGrid.
Here is my objects (I do not have the ability to change them, signatures tr...
I'm successfully getting a TextBox to resize with a parent Border height but I need the TextBox to actually be 50 pixels smaller in height than the parent Border.
Any ideas how to achieve this?
The code I'm using is
<Border VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
<TextBox x:Name="txtActivityNotes" HorizontalAl...
Hi Everyone,
I have a few 3d rectangles on my screen that I want to pivot around the Y axis.
I want to press down with the mouse, and rotate the 3d object to a max rotation, but when the user moves their mouse, I want to slightly rotate it so that it looks like a see-saw (rotating from a range of -13 to 13 degrees on the Y-Axis).
At ...
Hi all,
Im trying to apply a material to my GeometryModel3D at runtime like so:
var model3D = ShardModelVisual.Content as GeometryModel3D;
var materialGroup = model3D.Material as MaterialGroup;
BitmapImage image;
ResourceLoader.TryLoadImage("pack://application:,,,/AnzSurface;component/path file/img.png"...
We used 3DTools (http://3dtools.codeplex.com) to draw a 3d line, it allows user rotate it by mouse. I have question, how to limit user can rotate it on Z axis only? or on X axis, Y axis only?
<tool:TrackballDecorator >
<tool:Interactive3DDecorator
ContainsInk="True">
<Viewport3D>
<Viewport3D.Camera>
...
I want to programmatically add a row to the top in a DataGrid control. Any ideas?
...
Hello, could anyone help me to set combobox or combobox edit values from a datatable?
In WinForms it was something like this:
DataSet dataBases = GetDatabases();
if ((dataBases != null) && (dataBases.Tables[0].Rows.Count > 0))
{
comboBoxDataBases.DisplayMember = "DbName";
comboBoxDataBas...
I have a WPF listbox control that is declaratively bound to a textbox. The listbox's ItemsSource is an ObservableCollection that is built from an XML file. I can easily prevent duplicate entries in the listbox when a new item is added because I can check for it in the "Add" button's Click event handler.
However, when an existing item's ...
Hello, I try to implement Splash Screnn in WPF. I have found some nice ehample in MSDN, but there is one place:
private void _applicationInitialize(SplashScreen splashWindow)
{
Thread.Sleep(1000);
// Create the main window, but on the UI thread.
Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Invoker)delegate
{
...
I have a FlowDocument with much content inside. I need to get the controls that are currently in the visible area.
with
DependencyObject obj = FlowDocumentScrollViewerCtrl;
do
{
if (VisualTreeHelper.GetChildrenCount(obj) > 0)
{
obj = VisualTreeHelper.GetChild(obj as Visual, 0);
}
}
while (!(obj is ScrollViewer));
...
I'm using System.Windows.Controls.DataVisualization.Toolkit for charts in my WPF application.
The code for chart is:
<chartingToolkit:Chart>
<!-- Volume -->
<chartingToolkit:LineSeries
Title="Volume (M)"
ItemsSource="{StaticResource S...
What is the best way (in JavaScript) to launch a ".application" Application through javascript?
...