Search Results

Search found 6091 results on 244 pages for 'wpf storyboard'.

Page 4/244 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • WPF Binding to DataRow Columns

    - by Trindaz
    Hi, I've taken some sample code from http://sweux.com/blogs/smoura/index.php/wpf/2009/06/15/wpf-toolkit-datagrid-part-iv-templatecolumns-and-row-grouping/ that provides grouping of data in a WPF DataGrid. I'm modifying the example to use a DataTable instead of a Collection of entities. My problem is in translating a binding declaration {Binding Parent.IsExpanded}, which works fine where Parent is a reference to an entity that has the IsExpanded attribute, to something that will work for my weakly typed DataTable, where Parent is the name of a column and references another DataRow in the same DataTable. I've tried declarations like {Binding Parent.Items[IsExpanded]} and {Binding Parent("IsExpanded")} but none of these seem to work. How can I create a binding to the IsExpanded column of the DataRow Parent in my DataTable? Thanks in advance, Dave

    Read the article

  • WPF DataGrid issue with db40

    - by Rich Blumer
    I am using the following code to populate a wpf datagrid with items in my db4o OODB: IObjectContainer db = Db4oEmbedded.OpenFile(Db4oEmbedded.NewConfiguration(), "C:\Dev\ContractKeeper\Database\ContractKeeper.yap"); var contractTypes = db.Query(typeof(ContractType)); this.dataGrid1.ItemsSource = contractTypes.ToList(); Here is the XAML: <Window x:Class="ContractKeeper.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dg="http://schemas.microsoft.com/wpf/2008/toolkit" Title="Window1" Height="300" Width="300"> <Grid> <dg:DataGrid AutoGenerateColumns="True" Margin="12,102,12,24" Name="dataGrid1" /> </Grid> </Window> When the items get bound to the datagrid, the gridlines appear like there are records but no data is displayed. Has anyone had this issue with db4o and the wpf datagrid?

    Read the article

  • User Control inherit from ListBox in Wpf?

    - by Rev
    Hi. I want to make a user Control in WPf with same properties and events like ListBox.(can add items , remove them , selecting ,...) on way in windows App is use a user control which is inherit form ListBox. but in WPF I don't know how make User Control inherit from ListBox (or other WPF Control)!!! I write this code but it had an exception public partial class InboxListItem : ListBox { public InboxListItem() { InitializeComponent(); } and It's Xaml file <UserControl x:Class="ListBoxControl.InboxListItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:myTypes="clr-namespace:ListBoxControl" />

    Read the article

  • What is Silverlight's relationship -- if any -- to WPF?

    - by xarzu
    I was working with a WPF application and I decided that the controls and graphics I wanted to display on the grid might look better if it was a silverlight component. I thought this way because of all the cool silverlight controls that look very flash-like. But now that I have gottem my Visual Studio 2010 set up with SIlverlight, it seems that every silverlight app I can make are ASP.NET in nature. It seems that instead of a cool GUI control to make, Silverlight is telling me that it is primarely a dataflow sort of application for the web. What is the relationship, if any, between WPF and Silverlight. Can I or can I not put a silverlight control into my existing WPF application?

    Read the article

  • MEF CompositionInitializer for WPF

    - by Reed
    The Managed Extensibility Framework is an amazingly useful addition to the .NET Framework.  I was very excited to see System.ComponentModel.Composition added to the core framework.  Personally, I feel that MEF is one tool I’ve always been missing in my .NET development. Unfortunately, one perfect scenario for MEF tends to fall short of it’s full potential is in Windows Presentation Foundation development.  In particular, there are many times when the XAML parser constructs objects in WPF development, which makes composition of those parts difficult.  The current release of MEF (Preview Release 9) addresses this for Silverlight developers via System.ComponentModel.Composition.CompositionInitializer.  However, there is no equivalent class for WPF developers. The CompositionInitializer class provides the means for an object to compose itself.  This is very useful with WPF and Silverlight development, since it allows a View, such as a UserControl, to be generated via the standard XAML parser, and still automatically pull in the appropriate ViewModel in an extensible manner.  Glenn Block has demonstrated the usage for Silverlight in detail, but the same issues apply in WPF. As an example, let’s take a look at a very simple case.  Take the following XAML for a Window: <Window x:Class="WpfApplication1.MainView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="220" Width="300"> <Grid> <TextBlock Text="{Binding TheText}" /> </Grid> </Window> This does nothing but create a Window, add a simple TextBlock control, and use it to display the value of our “TheText” property in our DataContext class.  Since this is our main window, WPF will automatically construct and display this Window, so we need to handle constructing the DataContext and setting it ourselves. We could do this in code or in XAML, but in order to do it directly, we would need to hard code the ViewModel type directly into our XAML code, or we would need to construct the ViewModel class and set it in the code behind.  Both have disadvantages, and the disadvantages grow if we’re using MEF to compose our ViewModel. Ideally, we’d like to be able to have MEF construct our ViewModel for us.  This way, it can provide any construction requirements for our ViewModel via [ImportingConstructor], and it can handle fully composing the imported properties on our ViewModel.  CompositionInitializer allows this to occur. We use CompositionInitializer within our View’s constructor, and use it for self-composition of our View.  Using CompositionInitializer, we can modify our code behind to: public partial class MainView : Window { public MainView() { InitializeComponent(); CompositionInitializer.SatisfyImports(this); } [Import("MainViewModel")] public object ViewModel { get { return this.DataContext; } set { this.DataContext = value; } } } We then can add an Export on our ViewModel class like so: [Export("MainViewModel")] public class MainViewModel { public string TheText { get { return "Hello World!"; } } } MEF will automatically compose our application, decoupling our ViewModel injection to the DataContext of our View until runtime.  When we run this, we’ll see: There are many other approaches for using MEF to wire up the extensible parts within your application, of course.  However, any time an object is going to be constructed by code outside of your control, CompositionInitializer allows us to continue to use MEF to satisfy the import requirements of that object. In order to use this from WPF, I’ve ported the code from MEF Preview 9 and Glenn Block’s (now obsolete) PartInitializer port to Windows Presentation Foundation.  There are some subtle changes from the Silverlight port, mainly to handle running in a desktop application context.  The default behavior of my port is to construct an AggregateCatalog containing a DirectoryCatalog set to the location of the entry assembly of the application.  In addition, if an “Extensions” folder exists under the entry assembly’s directory, a second DirectoryCatalog for that folder will be included.  This behavior can be overridden by specifying a CompositionContainer or one or more ComposablePartCatalogs to the System.ComponentModel.Composition.Hosting.CompositionHost static class prior to the first use of CompositionInitializer. Please download CompositionInitializer and CompositionHost for VS 2010 RC, and contact me with any feedback. Composition.Initialization.Desktop.zip Edit on 3/29: Glenn Block has since updated his version of CompositionInitializer (and ExportFactory<T>!), and made it available here: http://cid-f8b2fd72406fb218.skydrive.live.com/self.aspx/blog/Composition.Initialization.Desktop.zip This is a .NET 3.5 solution, and should soon be pushed to CodePlex, and made available on the main MEF site.

    Read the article

  • Implementation of Nib project to Storyboard, Xcode

    - by Blake Loizides
    I have made a tabbed bar application in storyboard in xcode. I,m new to xcode. I got a Sample TableView XIB project from apple that I edited to my needs,The project has a UITableView that I Customized with Images, And with help of a certain forum member I was able to link up each image to a New View Controller. I tried to port or integrate My Nib Project Code to my StoryBoard Tabbed Bar Application.I thought I had everything right had to comment out a few things to get no errors, But the project only goes to a Blank Table View. Below are 2 links, 1 to my StoryBoard Tabbed Bar Application with the Table Code that I tried to integrate and the other My Successful Nib Project. Also is some code and pictures. If anybody has some free time and does not mind to help I would be extremely grateful for any input given. link1 - Storyboard link2 - XIB DecorsViewController_iPhone.m // // TableViewsViewController.m // TableViews // // Created by Axit Patel on 9/2/10. // Copyright Bayside High School 2010. All rights reserved. // #import "DecorsViewController_iPhone.h" #import "SelectedCellViewController.h" @implementation DecorsViewController_iPhone #pragma mark - Synthesizers @synthesize sitesArray; @synthesize imagesArray; #pragma mark - View lifecycle // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { // Load up the sitesArray with a dummy array : sites NSArray *sites = [[NSArray alloc] initWithObjects:@"a", @"b", @"c", @"d", @"e", @"f", @"g", @"h", nil]; self.sitesArray = sites; //[sites release]; UIImage *PlumTree = [UIImage imageNamed:@"a.png"]; UIImage *CherryRoyale = [UIImage imageNamed:@"b.png"]; UIImage *MozambiqueWenge = [UIImage imageNamed:@"c.png"]; UIImage *RoyaleMahogany = [UIImage imageNamed:@"d.png"]; UIImage *Laricina = [UIImage imageNamed:@"e.png"]; UIImage *BurntOak = [UIImage imageNamed:@"f.png"]; UIImage *AutrianOak = [UIImage imageNamed:@"g.png"]; UIImage *SilverAcacia = [UIImage imageNamed:@"h.png"]; NSArray *images = [[NSArray alloc] initWithObjects: PlumTree, CherryRoyale, MozambiqueWenge, RoyaleMahogany, Laricina, BurntOak, AutrianOak, SilverAcacia, nil]; self.imagesArray = images; //[images release]; [super viewDidLoad]; } #pragma mark - Table View datasource methods // Required Methods // Return the number of rows in a section - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section { return [sitesArray count]; } // Returns cell to render for each row - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CellIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; // Configure cell NSUInteger row = [indexPath row]; // Sets the text for the cell //cell.textLabel.text = [sitesArray objectAtIndex:row]; // Sets the imageview for the cell cell.imageView.image = [imagesArray objectAtIndex:row]; // Sets the accessory for the cell cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; // Sets the detailtext for the cell (subtitle) //cell.detailTextLabel.text = [NSString stringWithFormat:@"This is row: %i", row + 1]; return cell; } // Optional // Returns the number of section in a table view -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { return 1; } #pragma mark - #pragma mark Table View delegate methods // Return the height for each cell -(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 78; } // Sets the title for header in the tableview -(NSString *) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { return @"Decors"; } // Sets the title for footer -(NSString *) tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { return @"Decors"; } // Sets the indentation for rows -(NSInteger) tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath { return 0; } // Method that gets called from the "Done" button (From the @selector in the line - [viewControllerToShow.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissView)] autorelease]];) - (void)dismissView { [self dismissViewControllerAnimated:YES completion:NULL]; } // This method is run when the user taps the row in the tableview - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; SelectedCellViewController *viewControllerToShow = [[SelectedCellViewController alloc] initWithNibName:@"SelectedCellViewController" bundle:[NSBundle mainBundle]]; [viewControllerToShow setLabelText:[NSString stringWithFormat:@"You selected cell: %d - %@", indexPath.row, [sitesArray objectAtIndex:indexPath.row]]]; [viewControllerToShow setImage:(UIImage *)[imagesArray objectAtIndex:indexPath.row]]; [viewControllerToShow setModalPresentationStyle:UIModalPresentationFormSheet]; [viewControllerToShow setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; [viewControllerToShow.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissView)]]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewControllerToShow]; viewControllerToShow = nil; [self presentViewController:navController animated:YES completion:NULL]; navController = nil; // UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Tapped row!" // message:[NSString stringWithFormat:@"You tapped: %@", [sitesArray objectAtIndex:indexPath.row]] // delegate:nil // cancelButtonTitle:@"Yes, I did!" // otherButtonTitles:nil]; // [alert show]; // [alert release]; } #pragma mark - Memory management - (void)didReceiveMemoryWarning { NSLog(@"Memory Warning!"); [super didReceiveMemoryWarning]; } - (void)viewDidUnload { self.sitesArray = nil; self.imagesArray = nil; [super viewDidUnload]; } //- (void)dealloc { //[sitesArray release]; //[imagesArray release]; // [super dealloc]; //} //@end //- (void)viewDidUnload //{ // [super viewDidUnload]; // Release any retained subviews of the main view. //} - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } else { return YES; } } @end DecorsViewController_iPhone.h #import <UIKit/UIKit.h> @interface DecorsViewController_iPhone : UIViewController <UITableViewDelegate, UITableViewDataSource> { NSArray *sitesArray; NSArray *imagesArray; } @property (nonatomic, retain) NSArray *sitesArray; @property (nonatomic, retain) NSArray *imagesArray; @end SelectedCellViewController.m #import "SelectedCellViewController.h" @implementation SelectedCellViewController @synthesize labelText; @synthesize image; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { } return self; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } #pragma mark - View lifecycle - (void)viewDidLoad { [super viewDidLoad]; [label setText:self.labelText]; [imageView setImage:self.image]; } - (void)viewDidUnload { self.labelText = nil; self.image = nil; // [label release]; // [imageView release]; [super viewDidUnload]; } - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } @end SelectedCellViewController.h @interface SelectedCellViewController : UIViewController { NSString *labelText; UIImage *image; IBOutlet UILabel *label; IBOutlet UIImageView *imageView; } @property (nonatomic, copy) NSString *labelText; @property (nonatomic, retain) UIImage *image; @end

    Read the article

  • WPF TextBox SpellChecking Problem

    - by Alex
    How can I change the spellchecking language of a WPF textbox to french using XAML? I tried this but it doesn't work. <TextBox AcceptsReturn="true" SpellCheck.IsEnabled="true" FontSize="12" BorderBrush="Blue" Height="100" Language="fr-fr" /> French is supposed to be one of the 4 supported languages for spellchecking in WPF so I don't understand why it doesn't work. I also tried fr-CA but it still won't work.

    Read the article

  • WPF: Drag/Drop to re-order grid and jiggle

    - by Echilon
    I need to implement a grid in WPF which has squares that can be dragged/dropped to be re-ordered, but I'm not sure the best way to do it. I was thinking using an ObservableCollection of squares and a UniFormGrid but although I have experience with both WPF and drag/drop, ideally I'd like to do a kind of 'jiggle' when before the user releases the mouse. Any suggestions on a good starting point?

    Read the article

  • WPF: Restyling a window?

    - by mark smith
    Hi there, does anyone know if its possible to restyle a window in wpf. Or even better any tutorials or samples? Basically i would like to change the minimize and maximize buttons - oh and the close button to be slightly bigger.... I have expression blend.... Is this possible? I saw some samples in infragistics sample apps which have some great looking forms and as far as i can tell it doesn't use any custom wpf controls... Any ideas really appreciated

    Read the article

  • XAML C# WPF Best efficient way to do an ordered sequence of animations

    - by toni
    Hi everybody! I would like to do a sequence of animations on a label, for example, first do opacity animations from values 0 to 1 and vice versa and just at the end of opacity animation and not before a foreground animation. I would like to do it in XAML code and then start and finish de animation from C# code. Which is the best and efficient way to do it? All replies are welcome! Thanks in advance.

    Read the article

  • WPF Login Verification Using Active Directory

    - by psheriff
    Back in October of 2009 I created a WPF login screen (Figure 1) that just showed how to create the layout for a login screen. That one sample is probably the most downloaded sample we have. So in this blog post, I thought I would update that screen and also hook it up to show how to authenticate your user against Active Directory. Figure 1: Original WPF Login Screen I have updated not only the code behind for this login screen, but also the look and feel as shown in Figure 2. Figure 2: An Updated WPF Login Screen The UI To create the UI for this login screen you can refer to my October of 2009 blog post to see how to create the borderless window. You can then look at the sample code to see how I created the linear gradient brush for the background. There are just a few differences in this screen compared to the old version. First, I changed the key image and instead of using words for the Cancel and Login buttons, I used some icons. Secondly I added a text box to hold the Domain name that you wish to authenticate against. This text box is automatically filled in if you are connected to a network. In the Window_Loaded event procedure of the winLogin window you can retrieve the user’s domain name from the Environment.UserDomainName property. For example: txtDomain.Text = Environment.UserDomainName The ADHelper Class Instead of coding the call to authenticate the user directly in the login screen I created an ADHelper class. This will make it easier if you want to add additional AD calls in the future. The ADHelper class contains just one method at this time called AuthenticateUser. This method authenticates a user name and password against the specified domain. The login screen will gather the credentials from the user such as their user name and password, and also the domain name to authenticate against. To use this ADHelper class you will need to add a reference to the System.DirectoryServices.dll in .NET. The AuthenticateUser Method In order to authenticate a user against your Active Directory you will need to supply a valid LDAP path string to the constructor of the DirectoryEntry class. The LDAP path string will be in the format LDAP://DomainName. You will also pass in the user name and password to the constructor of the DirectoryEntry class as well. With a DirectoryEntry object populated with this LDAP path string, the user name and password you will now pass this object to the constructor of a DirectorySearcher object. You then perform the FindOne method on the DirectorySearcher object. If the DirectorySearcher object returns a SearchResult then the credentials supplied are valid. If the credentials are not valid on the Active Directory then an exception is thrown. C#public bool AuthenticateUser(string domainName, string userName,  string password){  bool ret = false;   try  {    DirectoryEntry de = new DirectoryEntry("LDAP://" + domainName,                                           userName, password);    DirectorySearcher dsearch = new DirectorySearcher(de);    SearchResult results = null;     results = dsearch.FindOne();     ret = true;  }  catch  {    ret = false;  }   return ret;} Visual Basic Public Function AuthenticateUser(ByVal domainName As String, _ ByVal userName As String, ByVal password As String) As Boolean  Dim ret As Boolean = False   Try    Dim de As New DirectoryEntry("LDAP://" & domainName, _                                 userName, password)    Dim dsearch As New DirectorySearcher(de)    Dim results As SearchResult = Nothing     results = dsearch.FindOne()     ret = True  Catch    ret = False  End Try   Return retEnd Function In the Click event procedure under the Login button you will find the following code that will validate the credentials that the user types into the login window. C#private void btnLogin_Click(object sender, RoutedEventArgs e){  ADHelper ad = new ADHelper();   if(ad.AuthenticateUser(txtDomain.Text,         txtUserName.Text, txtPassword.Password))    DialogResult = true;  else    MessageBox.Show("Unable to Authenticate Using the                      Supplied Credentials");} Visual BasicPrivate Sub btnLogin_Click(ByVal sender As Object, _ ByVal e As RoutedEventArgs)  Dim ad As New ADHelper()   If ad.AuthenticateUser(txtDomain.Text, txtUserName.Text, _                         txtPassword.Password) Then    DialogResult = True  Else    MessageBox.Show("Unable to Authenticate Using the                      Supplied Credentials")  End IfEnd Sub Displaying the Login Screen At some point when your application launches, you will need to display your login screen modally. Below is the code that you would call to display the login form (named winLogin in my sample application). This code is called from the main application form, and thus the owner of the login screen is set to “this”. You then call the ShowDialog method on the login screen to have this form displayed modally. After the user clicks on one of the two buttons you need to check to see what the DialogResult property was set to. The DialogResult property is a nullable type and thus you first need to check to see if the value has been set. C# private void DisplayLoginScreen(){  winLogin win = new winLogin();   win.Owner = this;  win.ShowDialog();  if (win.DialogResult.HasValue && win.DialogResult.Value)    MessageBox.Show("User Logged In");  else    this.Close();} Visual Basic Private Sub DisplayLoginScreen()  Dim win As New winLogin()   win.Owner = Me  win.ShowDialog()  If win.DialogResult.HasValue And win.DialogResult.Value Then    MessageBox.Show("User Logged In")  Else    Me.Close()  End IfEnd Sub Summary Creating a nice looking login screen is fairly simple to do in WPF. Using the Active Directory services from a WPF application should make your desktop programming task easier as you do not need to create your own user authentication system. I hope this article gave you some ideas on how to create a login screen in WPF. NOTE: You can download the complete sample code for this blog entry at my website: http://www.pdsa.com/downloads. Click on Tips & Tricks, then select 'WPF Login Verification Using Active Directory' from the drop down list. Good Luck with your Coding,Paul Sheriff ** SPECIAL OFFER FOR MY BLOG READERS **We frequently offer a FREE gift for readers of my blog. Visit http://www.pdsa.com/Event/Blog for your FREE gift!

    Read the article

  • Xcode 5 - remove storyboard and start app with a .xib

    - by Lucy
    I've tried to follow the instructions on this Question. But I must not be doing something correctly because I am still getting a SIGABRT before I even get into the ViewController methods. Here are the steps: Copied all items on the view in the story board and pasted into the new xib view. Copied all contents of .h and .m view controller files into the new ones for the xib. Changed the Main nib file base name to the new xib name in the info.plist file. Tried to change the owner but I don't know if I'm doing that correctly. Edited the appdelegate didFinishLaunchingWithOptions file as follows: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ; // Override point for customization after application launch. TestViewController *test = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:test]; self.window.rootViewController = nav; [self.window makeKeyAndVisible]; return YES; } I even tried to start with an empty project like one of the last posts suggested and still get a SIGABRT when I try to run. Has Apple made it impossible to remove the storyboard? I'm creating an SDK. I don't want a storyboard. But I do need one xib that is rotatable. Help?

    Read the article

  • UITableView overlaps with NavigationBar in Storyboard Setting on first run

    - by Evils
    I know this seems to be a duplicate question which has been around here many many times, but believe me, I tried all iOS7 and earlier fixes which sets the Layout to a different Edge configuration without any change. My Storyboard looks like this: -> Navigation Controller -> Tab Bar Controller -> MyTableViewController -> VCForCellOne With the first run of my application the UITableView overlaps with the source NavigationController as shown here: After clicking on one of my Cells which pushes the corresponding ViewController to the NavigationController and going back again, everything looks fine as shown here: So everything is as it should be after once pushing another ViewController to the NavigationController and then going back. Switching from Portrait to Landscape and back also fixes the layout problem and everything is layed out as it should be. My ViewController within the Storyboard looks like this: I left it the default value, so I don't know what goes wrong here. I hope you understand my problem here. There's no custom class ViewController here, so no additional code which messes up something here. Any help highly appreciated!

    Read the article

  • WPF Button Storyboard with an image for MouseOver

    - by Vinjamuri
    I have the following xaml for changing the image for WPF button when mouse is on the button. It give below error. Any help is appreciated... 'System.Windows.Media.Animation.DoubleAnimation' animation object cannot be used to animate property 'Source' because it is of incompatible type 'System.Windows.Media.ImageSource'. <Style TargetType="{x:Type local:ButtonControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:ButtonControl}"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="MouseOver"> <Storyboard> <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Source" To="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MouseOverImage}" /> </Storyboard> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border> <Image x:Name="img" Source="pack://application:,,,/Recipe_06_13;component/Resources/normal.bmp" /> </Border> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • WPF opening up exe program within WPF window

    - by SwiftLion
    Not sure if this is possible but is there a way to open up another program like notepad within the container of a WPF window? similiar to that of being able to open a web page using the webbrowser control? Basically I would like to open notepad or other exe but keep it constrained within the WPF window container using xaml/c# code? not sure if possible?

    Read the article

  • wpf how to get all TextBoxes in wpf application

    - by GC87
    Hi, I'm trying to learn how to do proper wpf application and now I have a big trouble. I know how I would do this if I had to do it with Windows Forms, but I don't know how to modify it to fit with wpf. Would someone know the answer? Here is my code for Windows Forms Form_loaded event: foreach (Control ctrl in this.Controls) { if (ctrl is TextBox) { ctrl.Text = ""; } }

    Read the article

  • Disabling Minimize and Maximize buttons in a WPF Window

    - by marianor
    In WPF there is no possibility to control when the Minimize and Maximize buttons are disabled when the WindowStyle is SingleBorderWindow or ThreeDBorderWindow . In Windows Forms there are some properties like ControlBox , MinimizeBox and MaximizeBox that allow to do that. Because the WPF window internally has a hWnd we can do this using Windows API ( GetWindowLong and SetWindowLong will do the trick). I did three attached properties applicable to Window that use the internal API, in order to disable...(read more)

    Read the article

  • WPF storyboard object access.

    - by Guru
    Hey, I'm new to silverlight and wpf programming I've just created a simple storyboard in silverlight which increases height and width of a button. As I wanted, I wrote this code so that whenever I move cursor on the button storyboard begins. here is the code used for silverlight. private void button_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { if(Storyboard1.GetCurrentState()!=ClockState.Active) Storyboard1.Begin(); } Everything is fine in above scenario as far as I use silverlight. But now I wanted to use the same functionality in WPF. But the problem I faced is that in WPF button click event handler I can't access the Storyboard1 object. Please help me to access the storyboard object in event handler.

    Read the article

  • Starting an animation from the ViewModel in WPF/MVVM

    - by RandomEngy
    I'm writing a MVVM app and have started putting in a few animations. I want to call something on the ViewModel which starts the a storyboard. This blog had a promising approach to it, but it doesn't actually work. The IDChanged handler never fires for some reason. I also found that you could start animations on EventTriggers, but I don't know how to raise one on the ViewModel.

    Read the article

  • What is the WPF equivilant for the FlowLayoutPanel?

    - by Sargola
    I am working on a WPF application (a one note clone which is called "note your life") where you can dynamically assign Tags to an entry (just as in virtually any web 2.0 app these days). for this I had in my windows forms prototype a FlowLayoutPanel that did the job very well. I want to have the tags float to the next line if there isn't enough space and get a scrollbar if needed. how can this be achieved with WPF? I played around with <StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" ...> but this doesn't move the elements in the next line if needed. Any suggestions?

    Read the article

  • forcing Validation; WPF, DataGrid, ObservableCollection

    - by Steve Mills
    I have a WPF DataGrid. I read a csv file and build an ObservableCollection of objects. I set the DataGrid.ItemsSource to the Collection. I would like to then force a RowValidation on every row in the DataGrid. If I, playing user, edit a cell, the RowValidation fires, all is well. But the Validation does not fire on the initial load. Is there some way I can call ??ValidateRow?? on a row? on every row? (C#, WPF, VS2008, etc)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >