I am not familiar with WPF, and I just feel quite confusing.
I am trying to create a little computer game, and there are elements I want to display dynamically. I use Image class and add the images to a canvas. But I'm not sure whether it's a good practice. I feel that adding controls to canvas seem to be a little wired. And I'm a littl...
Hi, I have a several part question regarding authorization. I have a WPF ClickOnce application. It talks to a few WCF Services. Users will be on the VPN or domain authenticated. If a user in on the VPN, the application will prompt for credentials and impersonate using those credentials. I'm authenticating users using System.Director...
hi, guys!
i have a problem about the image display in wpf.
here's my code
<Button HorizontalAlignment="Left" Grid.Column="1" Grid.Row="5" Margin="0,5">
<Button.Content>
<StackPanel Orientation="Horizontal" Margin="10,0">
<Image Source="/images/user_add.png" Stretch="None" HorizontalAlignment="Center" ...
I just want to have a few ellipses that no matter how the container changes, the height and width should always be the same. I found a solution but it's too slow, I'll post it here to illustrate what I want to do. Let me know if you have any idea on a good way to achieve this.
<Grid>
<Ellipse Width="Auto"
Height="{Bindi...
I have a TextBox whose Value is binded to a ViewModel property:
<TextBox Name="txtRunAfter" Grid.Column="4" Text="{Binding Mode=TwoWay, Path=RunAfter}" Style="{StaticResource TestStepTextBox}"/>
The set and get were working fine until I tried to add some validation when the Value is set:
private int _runAfter = 0;
pub...
I am trying to restart an application in WPF.
I tried the following:
Process.Start(Application.ExecutablePath);
Process.GetCurrentProcess().Kill();
And it doesn't work because the application is setup as a single instances application.
Then I tired this:
Process.GetCurrentProcess().Kill();
Process.Start(Application.ExecutablePath)...
Hey all, I've got a scenario where I want to switch the visiblity of 4 different content controls. The visual states I have set opacity, and collapsed based on each given state (See code.) What I'd like to do is have the visual state bound to a property of my View Model of type Enum. I tried using DataStateBehavior, but it requires tr...
Hey all,
I'm new to using WPF. I have the following program I want to create:
-Application opens up with one button
-User clicks button and it takes them to a new page with various input.
I'm confused about how I need to do this. I tried opening a new window, but I don't want a window to open up, I want it to be all one Window. I trie...
Simplified example:
I have an object that models a user. Users have a first name and a last name. The UserViewModel has a dependency property for my Models.User object. In the declaration of the UserView's xaml, I want to bind a couple of TextBlocks to the first and last name properties.
What is the correct way to do this? Should I...
Hi I know how to write to console but if I write to console in my program and call my program from the command line it won't display anything.
How do I make it so that when I say Console.WriteLine or Console.Out.Writeline ir prints to the command prompt from which it was called and not somewhere else?
Once again I know how to do Consol...
In the program I am trying to build, I have a menu button that opens a second window. The user puts information into the second window, presses the "Done" button, and the information is transfered into the main window. The problem I am having is opening the second window. I have both windows build in xaml files in Visual Studio but I ...
For example, I have an empty tabControl in my Windows during the compile time, and I have an undetermined amount of images need to be added onto the tabControl, so I used loop + tabControl.Children.Add("image1 to x") to add those images... but after that during runtime, I want to perform events on those image controls, such as dragging t...
Consider this document structure:
<FlowDocument><Paragraph>loreM Ipsum</Paragraph></FlowDocument>
And my caret position is between 'M' and 'I' in the RichTextBox. How can I get the parent element from caret position? In this case the parent would be the Paragraph.
...
Can anyone speak to the ease of dividing work amongst multiple developers when designing and building a medium- to large-complexity Silverlight or WPF application? My team is finding it difficult to cleanly split work when you've got, for example, a number of controls that provide different visualizations of a Model/ViewModel that's fair...
If you have a moment, please try this:
-Download Subsonic 3.
-Start a new proj and add SS's ActiveRecord templates.
-Point it to any SQL Server DB and generate the classes.
-Add a WPF project.
-Create a window and add a combobox or listbox.
-Set the ItemsSource from the SS DAL, and format it how you wish.
-Add a button that will show ...
Let me ask this question with a pseudo code:
<Window>
<ListView ItemsSource="{Binding PersonCollection}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Path=Name}" />
<TextBlock Text="{Binding Path=Age}" />
...
I'm trying to create a generic repository for my models. Currently i've 3 different models which have no relationship between them. (Contacts, Notes, Reminders).
class Repository<T> where T:class
{
public IQueryable<T> SearchExact(string keyword)
{
//Is there a way i can make the below line generic
//return db.Co...
<EssenceList>
<Essence GUID="464">
<Properties>
<Property Name="Name">
<value>mt-1232-1. (1-1-3)</value>
</Property>
</Properties>
<Characteristics>
<Characteristic GUID="78">
<value>gadget</value>
</Characteristic>
<Characteristic GUID="79">
<value>measures</value>
...
Hi All,
I want to hide the navigation bar in the page created using wpf. i have tried ShowsNavigationUI = false. but still it displaying the control.
Geetha.
...
I am using EventAggregator in Prism, and I want the events persisted, which means when a client subscribes a certain event, the aggregator published the previous events that missed to the client. Is there a way to support this?
I know this sounds more like a message queue or something. But the system has already heavily coupled with Eve...