Search Results

Search found 11705 results on 469 pages for 'wpf layout'.

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

  • Silverlight Grid Layout is pain

    - by brainbox
     I think one of the biggest mistake of Silverlight and WPF is its Grid layout.Imagine you have a data form with 2 columns and 5 rows. You need to place new row after the first one. As a result you need to rewrite Grid.Rows and Grid.Columns in all rows belows. But the worst thing of such approach is that it is static. So you need predefine all your rows and columns. As a result creating of simple dynamic datagrid or dataform become impossible... So the question if why best practices of HTML and Adobe Flex were dropped????If anybody have tried to port Flex Grid layout to silverlight please mail me or drop a comment.

    Read the article

  • Ubuntu 13.10 japanese keyboard layout intercepts Caps Lock

    - by Envek
    I've installed Ubuntu 13.10 (clean install on new machine), there are lot of changes for configuring keyboard layouts and I've tried to configure it as I've used earlier: Englis (US), Russian and Japanese (Anthy) with switching between them with Caps Lock key. (See screenshot) Caps Lock switching works fine between Russian and English and vice-versa, but with Japanese I can switch only TO Japanese (not FROM), in Japanese layout Caps Lock starting to work as usual Caps Lock (as a switch between small and BIG letters), so I need to use mouse to switch back to Ru or En layout. This happens ONLY with Japanese layouts (I've tried also simply "Japanese" and "Japanese (Kana)"), not with Chinese, Korean or anything else. I'm not sure who is blame for that, is it ibus-anthy or anything. Please help, I want to use Caps Lock to switch between all layouts. Also, I've created a bug in the LaunchPad: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1247363

    Read the article

  • How to change keyboard layout?

    - by swedishhh
    I'm on ubuntu 12.04. Recently I bought a cheap apple style bluetooth keyboard. It pairs OK. I paired it with the current 102 key still attached. Anyway I noticed that the character mapping is incorrect. Most keys do not type anything - some keys on the right (k, l, ;') etc give numbers, but that's about it. So I rebooted, with 102 kbd unattached, and the bluetooth keyboard on, ready to connect. After boot at the login screen, the bluetooth keyboard had paired. I typed my password, and it logged in fine!! However after the user login was complete it reverted to the broken behaviour. A glance at the layout chart shows ubuntu thinks I still have the 102 layout, even though it remained disconnected. Any ideas? Thanks, Dave

    Read the article

  • Display current layout (language code/country flag) in keyboard indicator

    - by Jono
    Just upgraded from 10.04 to 10.10, and the keyboard indicator applet no longer displays the two-letter country code for the active layout. This is terrible. Is this the default behaviour? Anyone using two layouts can't tell which language they're in. I can't seem to find the setting for this, it used to be in the preferences for keyboard layout. Update 1: In case this wasn't obvious - I have two keyboard layouts - English and Hebrew. I just upgraded form 10.04, where the country code (USA/IL) was displayed, overlaid on the flag. Now all I get is a vague keyboard icon, and can't find the settings for this. Update 2: this seems to be a bug that people have been reporting since Lucid, and is now back in Maverick

    Read the article

  • Display current layout (language code/country flag) in keyboard indicator

    - by Jono
    Just upgraded from 10.04 to 10.10, and the keyboard indicator applet no longer displays the two-letter country code for the active layout. This is terrible. Is this the default behaviour? Anyone using two layouts can't tell which language they're in. I can't seem to find the setting for this, it used to be in the preferences for keyboard layout. Update 1: In case this wasn't obvious - I have two keyboard layouts - English and Hebrew. I just upgraded form 10.04, where the country code (USA/IL) was displayed, overlaid on the flag. Now all I get is a vague keyboard icon, and can't find the settings for this. Update 2: this seems to be a bug that people have been reporting since Lucid, and is now back in Maverick

    Read the article

  • 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

  • How do I change the keyboard layout to a non-standard one on a Live (USB) session?

    - by Agmenor
    I am running Ubuntu 13.04 in a Live (USB) session. My physical keyboard layout is called Bépo, it is the French language Dvorak method-based layout. I would like to change my input layout to this too. To do this, I tried booting in a French spoken session, then open the Keyboard Layout preferences app. Normally, to add a layout, you should click on the + sign and select your layout. However the list that appears is very short and does not contain what I want. On the contrary, on a persistent non-live installation, the choice of Bépo is present. This is also the case during an installation of Ubuntu. So I do I change the keyboard layout of my live session to the correct one?

    Read the article

  • How to set padding to columns in table layout dynamically

    - by Praveenb
    Hi all, I am trying to create a table layout with buttons dynamically. I am able to get the table layout with buttons. bt i need padding between buttons. How i can get programatically. I tried following code bt private void showCowsTblField() { for (int row = 0; row < numberOfRowsInField-1; row++) { TableRow tableRow = new TableRow(this); tableRow.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT )); for (int column = 0; column < numberOfColumnsInField -1; column++) { blocks[row][column].setLayoutParams(new LayoutParams( LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT)); blocks[row][column].setPadding(blockPadding, blockPadding, blockPadding, blockPadding); tableRow.addView(blocks[row][column]); tableRow.setPadding(blockPadding, blockPadding, blockPadding, blockPadding); } tblCows.addView(tableRow,new TableLayout.LayoutParams( LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT)); } } Please let me know.... Thanks.

    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

  • Define global textbox (or other control) width in WPF

    - by John B
    I'd like to be able to maintain the width of controls globally throughout my WPF application. Previously in winforms world I'd override onload in a base form and iterate through all controls and containers and determine the type of controls and set the dimensions accordingly. I guess I could do the same in WPF but is there any better way to do this?

    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

  • controls layout WPF

    - by jonathan
    i have a LOB application with 30 fields to put in a form. I found it very painful to put them in the window with a grid. is there a productive way to build entry forms in WPF . Thanks John

    Read the article

  • Keyboard layout - certain keys work with AltGr, other doesn't

    - by user23122
    I run Ubuntu 12.04 in VirtualBox 4.3.14 on Windows 7 with a Swedish keyboard layout. In Windows everything works fine but in Ubuntu some keys/characters (the most important for a programmer) doesn't work. This is the result from pressing the keys in the top row 1234567890+´ (Unmodified top row on keyboard) @£$€ {[]}\ (Windows with AltGr) ¡ £$€¥ ± (Ubuntu with "AltGr") More characters are broken (pipe | is a notable example) but the top row is the biggest problem. I can workaround this by enabling "direct connection" from my USB keyboard to VirtualBox but then I have to manually disable that every time I switch out of VirtualBox. I have tried different keyboard layout, sometimes @ et al works but then other characters are broken. I also tried sudo dpkg-reconfigure keyboard-configuration with default values, but it didn't change anything. I have guest additions installed (from the built in virtual CD). I got my VB disk image from a colleague who does not have this problem, however, he does not have guest additions installed (and hence can't use a higher resolution than 1024x768, and I need to run Ecplipse...). He also have different installation of Virtual Box and Windows. For example, the key for 2 should, in Ubuntu, produce four different characters, 2"²@. The first three works fine, including superscript 2 that requires AltGr-Shift-2, it is just plain AltGr-2 to get @ that does not work on this key (and all the other keys I have problem with). Any ideas for a fix?

    Read the article

  • Option Button in Keyboard Layout > Input Sources is not pressable

    - by user98647
    I would like to set the Caps-lock key as a Compose key, which you do, as far as I remember, by pressing the Options Button in Keyboard Layout Input Sources and then enabling the appropriate option there. That Button is not pressable though since I switched to 12.10. It did work in previous releases of Ubuntu. gnome-control-center puts out these errors, when I click on Keyboard Layout: (gnome-control-center:3645): common-cc-panel-WARNING **: Could not find current language '?\u0003C!\u007f' in the treeview (gnome-control-center:3645): common-cc-panel-WARNING **: locale '"en_US.UTF-8"' isn't valid I'm not sure if the errors are related though, maybe they are related to the "interface switching to chinese bug" which seems surprisingly widespread: Language changed to Chinese, how do I change it back? Language Support has an unwanted Chinese language option Nautilus Folders Turned Chinese Desktop 12.04 gnome/cairo suddenly in Chinese Unwanted Chinese language got set in system settings I cannot set my system back to English from Chinese Language Gnome-classic language turned into Chinese, how do I change it back to English? Strange display language in gnome shell I'm not sure they are related to this bug, but I just wanted to mention it, maybe it helps!

    Read the article

  • How to keep relative position of WPF elements on background image

    - by Masterfu
    Hi folks, I am new to WPF, so the answer to the following question might be obvious, however it isn't to me. I need to display an image where users can set markers on (As an example: You might want to mark a person's face on a photograph with a rectangle), however the markers need to keep their relative position when scaling the image. Currently I am doing this by using a Canvas and setting an ImageBrush as Background. This displays the image and I can add elements like a Label (as replacement for a rectangle) on top of the image. But when I set a label like this, it's position is absolute and so when the underlying picture is scaled (because the user drags the window larger) the Label stays at it's absolute position (say, 100,100) instead of moving to the new position that keeps it "in sync" with the underlying image. To cut the matter short: When I set a marker on a person's eye, it shouldn't be on the person's ear after scaling the window. Any suggestions on how to do that in WPF? Maybe Canvas is the wrong approach in the first place? I could keep a collection of markers in code and recalculate their position every time the window gets resized, but I hope there is a way to let WPF do that work for me :-) I am interested in hearing your opinions on this. Thanks

    Read the article

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