Search Results

Search found 625 results on 25 pages for 'stretch'.

Page 15/25 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • treeview binding wpf cannot bind nested property in a class

    - by devnet247
    Hi all New to wpf and therefore struggling a bit. I am putting together a quick demo before we go for the full implementation I have a treeview on the left with Continent Country City structure when a user select the city it should populate some textboxes in a tabcontrol on the right hand side I made it sort of work but cannot make it work with composite objects. In a nutshell can you spot what is wrong with my zaml or code. Why is not binding to a my CityDetails.ClubsCount or CityDetails.PubsCount? What I am building is based on http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx Thanks a lot for any suggestions or reply DataModel public class City { public City(string cityName) { CityName = cityName; } public string CityName { get; set; } public string Population { get; set; } public string Area { get; set; } public CityDetails CityDetailsInfo { get; set; } } public class CityDetails { public CityDetails(int pubsCount,int clubsCount) { PubsCount = pubsCount; ClubsCount = clubsCount; } public int ClubsCount { get; set; } public int PubsCount { get; set; } } ViewModel public class CityViewModel : TreeViewItemViewModel { private City _city; private RelayCommand _testCommand; public CityViewModel(City city, CountryViewModel countryViewModel):base(countryViewModel,false) { _city = city; } public string CityName { get { return _city.CityName; } } public string Area { get { return _city.Area; } } public string Population { get { return _city.Population; } } public City City { get { return _city; } set { _city = value; } } public CityDetails CityDetailsInfo { get { return _city.CityDetailsInfo; } set { _city.CityDetailsInfo = value; } } } XAML <DockPanel> <DockPanel LastChildFill="True"> <Label DockPanel.Dock="top" Content="Title " HorizontalAlignment="Center"></Label> <StatusBar DockPanel.Dock="Bottom"> <StatusBarItem Content="Status Bar" ></StatusBarItem> </StatusBar> <Grid DockPanel.Dock="Top"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="2*"/> </Grid.ColumnDefinitions> <TreeView Name="tree" ItemsSource="{Binding Continents}"> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsExpanded" Value="{Binding IsExpanded,Mode=TwoWay}"/> <Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay}"/> <Setter Property="FontWeight" Value="Normal"/> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="FontWeight" Value="Bold"></Setter> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type ViewModels:ContinentViewModel}" ItemsSource="{Binding Children}"> <StackPanel Orientation="Horizontal"> <Image Width="16" Height="16" Margin="3,0" Source="Images\Continent.png"/> <TextBlock Text="{Binding ContinentName}"/> </StackPanel> </HierarchicalDataTemplate> <HierarchicalDataTemplate DataType="{x:Type ViewModels:CountryViewModel}" ItemsSource="{Binding Children}"> <StackPanel Orientation="Horizontal"> <Image Width="16" Height="16" Margin="3,0" Source="Images\Country.png"/> <TextBlock Text="{Binding CountryName}"/> </StackPanel> </HierarchicalDataTemplate> <DataTemplate DataType="{x:Type ViewModels:CityViewModel}" > <StackPanel Orientation="Horizontal"> <Image Width="16" Height="16" Margin="3,0" Source="Images\City.png"/> <TextBlock Text="{Binding CityName}"/> </StackPanel> </DataTemplate> </TreeView.Resources> </TreeView> <GridSplitter Grid.Row="0" Grid.Column="1" Background="LightGray" Width="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> <Grid Grid.Column="2" Margin="5" > <TabControl> <TabItem Header="Details" DataContext="{Binding Path=SelectedItem.City, ElementName=tree, Mode=OneWay}"> <StackPanel > <TextBlock VerticalAlignment="Center" FontSize="12" Text="{Binding CityName}"/> <TextBlock VerticalAlignment="Center" FontSize="12" Text="{Binding Area}"/> <TextBlock VerticalAlignment="Center" FontSize="12" Text="{Binding Population}"/> <!-- DONT WORK WHY--> <TextBlock VerticalAlignment="Center" FontSize="12" Text="{Binding SelectedItem.CityDetailsInfo.ClubsCount}"/> <TextBlock VerticalAlignment="Center" FontSize="12" Text="{Binding SelectedItem.CityDetailsInfo.PubsCount}"/> </StackPanel> </TabItem> </TabControl> </Grid> </Grid> </DockPanel> </DockPanel>

    Read the article

  • How to have ListView items with Label show up at the bottom of the item not to the right in WPF?

    - by Joan Venge
    I am using a WrapPanel with an Image and Label, but the Label shows up to the right of the item. How can I make it show up at the bottom of the Image/Item? <Window.Resources> <DataTemplate x:Key="ItemTemplate"> <WrapPanel Orientation="Horizontal"> <Image Width="50" Height="50" Stretch="Fill" Source="{Binding Cover}"/> <Label Content="{Binding Title}" /> </WrapPanel> </DataTemplate> </Window.Resources>

    Read the article

  • Receiving messages part by part from serial port using c#

    - by karthik
    I am using the below code to receive the messages from serial port using c# void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { if (comPort.IsOpen == true) { string msg = comPort.ReadExisting(); MessageBox.Show(msg.Trim()); } } The problem is, i am getting the messages part by part. Like, if u send "Hello, How are you" I am receiving it word by word. I want that in a single stretch. How can i do ?? Also, is it possible to retrieve the port name from which the application is sending and receiving messages ?

    Read the article

  • PHP AJAX mysql event calendar - UI for events spanning multiple days

    - by play
    I have built a PHP calendar system and have pretty much everything done but not sure how to deal with a UI issue involving how the events that stretched out over a couple of days. I want to be able to stretch an event that stretches over couple of days in a div that spans those days in the calendar. Basically I would like to know how to achieve what these guys have achieved with the event that stretches out from 21st to 22nd with the yellow div background. I have been trying to see how I can do it with PHP but I feel like I might be trying the wrong thing. Perhaps this is done with javascript?

    Read the article

  • How to made my background image strech if I dynamicaly insert DIV in the middle of the page

    - by Alain
    Hi, I have a background image which I apply to the body. The image is only in the bottom and stretch to the entire width of the page. The image is 1 X 320 px. body { background-image: url("../images/bg-main.gif"); background-position: 0% 100%; background-repeat:repeat-x; } The rest of my web site is in 1024 X 768 resolution. It works perfectly until I dynamically insert a new DIV in the middle of the page using javascript. It cause the browser scroll bar to appear and when I scroll down to the bottom, I can see the image stopping right at it's original position. How can I make my image get down again without reloading the page ??? I'm using the EXTJS framework to avoid reloading the page... Thanks Alain

    Read the article

  • Animating resizing and moving UIView at the same time

    - by chouchou
    I'd like to "Stretch" a UIView to the right side, meaning increase it's frame.size.width by foo pixels and at the same time decreasing it's frame.origin.x by foo pixels, using [UIView beginAnimations] syntax. However, if I do that, when the animation begins the view immediately resizes, and then starts the animation for the origin. CGRect currFrame = someView.frame; currFrame.size.width += 100; currFrame.origin.x -= 100; [UIView beginAnimations:@"Anim1" context:nil]; someView.frame = currFrame; [UIView setAnimationDuration:0.7]; [UIView commitAnimations]; I've also tried breaking the animation down to 2 parts but then I can't keep the right position in place. Any help is much appreciated!

    Read the article

  • GWT vertical layout

    - by skrat
    I need a vertical layout, which would fill browser's viewport top to bottom, with on overflow (scrollbars). I need to layout widgets on the top, and on the bottom, and have one widget in the center which would stretch to fill the remaining space. There seems to be DockLayoutPanel for this purpose, the problem with it is that it forces me to specify widget sizes, and I don't know the sizes of the top/bottom widgets before the browser does it's layouting job, which is tricky (buggy) to track. I cannot find the right moment when to measure my widgets, and I don't want to do this kind of layouting code anyway.

    Read the article

  • Android: Enable selection in webkit

    - by tacone
    Hello, I'am looking for a way to have a webview content selectable in the very same way as the stock browser does. user long presses the text the whole word is selected two pins appear at the word's boundary allowing the user to stretch/shrink the selection. I should note that Dolphin HD shows exactly the same text select functionality as the default browser (same icons, animation, etc), so it really should be possible. But I can't figure out how. Until now, all i found was this function, which kind of work, but doesn't allow the user to expand/shrink the selection. public void selectAndCopyText() { try { KeyEvent shiftPressEvent = new KeyEvent(0,0,KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_SHIFT_LEFT,0,0); shiftPressEvent.dispatch(mWebView); } catch (Exception e) { throw new AssertionError(e); } }

    Read the article

  • How to avoid HTML Canvas auto-stretching

    - by Tom
    I have the following piece of HTML: <style type="text/css"> #c{width:200px;height:500px} </style> <canvas id="c"></canvas> <script type="text/javascript"> var i = new Image(); i.onload = function () { var ctx = document.getElementById('c').getContext('2d'); ctx.drawImage(i, 0, 0); } i.width = i.height = 20; // actual size of square.png i.src = 'square.png'; </script> The issue is that the drawn image is automatically stretched (resized) proportionally with the size of the canvas. I have tried using all available parameters (drawImage(i, 0, 0, 20, 20, 0, 0, 20, 20)) and that didn't help. What is causing my drawing to stretch and how can I prevent that? Thanks, Tom

    Read the article

  • clickable div with img in it?

    - by acidzombie24
    I have a div i would like to make clickable. I know i need to make the div (and?) the link have a fixed width and height + display: block. I have an imagine inside of the div. It seems like the 'clickable' div is actually a large transparent link and this click does not play well with images as it doesnt share space. I need to right click the image and hit save as. So how do i make the div clickable. I tried setting the img width and height but it made the img stretch.

    Read the article

  • Path element of Siverlight issue

    - by George2
    Hello everyone, Suppose I have the following XAML code, my confusions are, (1) I do not know the exact meaning of Data attribute, especially items starts with letter M/C, (2) there is no special configuration for TransformGroup (all using default settings), why put the TransformGroup here? <Path Height="2.75" Width="2.75" Data="M2.75,1.375 C2.75,2.1343915 2.1343915,2.75 1.375,2.75 C0.61560845,2.75 0,2.1343915 0,1.375 C0,0.61560845 0.61560845,0 1.375,0 C2.1343915,0 2.75,0.61560845 2.75,1.375 z" Fill="#FF9F9B9B" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" Canvas.Top="7" x:Name="p3"> <Path.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform/> <TranslateTransform/> </TransformGroup> </Path.RenderTransform> </Path> thanks in advance, George

    Read the article

  • Please list here your deliberate practices in software development...

    - by JDelage
    What are your deliberate practices in relation with your work as a software developer / professional, or as a CS student? Deliberate practice are exercise and repetitions targeted specifically at an individual's weak points and meant to consistently stretch / grow someone's ability. It was described in this Anders Ericsson paper. To qualify as a deliberate practice, the exercise must satisfy the following: Is not inherently enjoyable. Is not play or paid practice. Is relevant to the skill being developed. Is not simply watching the skill being performed. Requires effort and attention from the learner. Often involves activities selected by a coach or teacher to facilitate learning. Please answer with one practice per answer. I'll seed the question with one possible answer.

    Read the article

  • How to change the band height dynamically?

    - by Kumar
    Is it possible to modify the height of detail band dynamically in jasper report? Because in my application i need to create pdf document.I have used one main document inside detail band of that main document i used one subreport. Sub report will take java bean as data source. This java bean return a list of field. So if we fixed the size of band then some time all values are not stretch in the document. Is it possible to change the detail band dynamically.

    Read the article

  • Reading Ontology with Jena, feeding it with RDF triples, and producing correct RDF string output.

    - by JonB
    Hi, I have an ontology, which I read in with Jena to help me scrape some RDFa triples from a website. I don't currently store these triples in a Jena model, but that is fairly straight forward to do, its on my to do next list. The area I am struggling with, though, is to get Jena to output correct RDF for the ontology I have. The ontology uses Owl and RDFS definitions, but when I pass some example triples into the model, they don't appear correctly. Almost as if it doesn't know anything about the ontology. The output is, however, still valid RDF, just it's not coming out in the form I was hoping for. Am I correct in thinking that Jena should be able to produce well written RDF (not just valid) about the triples I have collected, based on the ontology or does this out stretch what it is capable of? Many thanks for any input.

    Read the article

  • Can I increase a buttons onclick-area programmatically?

    - by sandis
    Sometimes I have a button in my UI that it is so small that it is difficult to click. My solution so far has been to add a transparent border around the button in photoshop. Just increasing the padding on the button does not work, since this will also stretch the image. Since it is kind of a fuss to open photoshop each time I want to change the clickable surface, is there any way to do this programmatically? I have tried placing a framelayout behind the button and make it clickable, but then the button wont change appearance on touch as it should. Ofcourse I could also add a ontouchlistener on the framelayout which changes the buttons appearance, but then it quite some code if I have several of those buttons. Cheers,

    Read the article

  • Windows store apps: ScrollViewer with dinamic content

    - by Alexandru Circus
    I have a scrollViewer with an ItemsControl (which holds rows with data) as content. The data from these rows is grabbed from the server so I want to display a ProgressRing with a text until the data arrives. Basically I want the content of the ScrollViewer to be a grid with progress ring and a text and after the data arrives the content to be changed with my ItemsControl. The problem is that the ScrollViewer does not accept more than 1 element as content. Please tell me how can I solve this problem. (I'm a C# beginner) <FlipView x:Name="OptionPagesFlipView" Grid.Row="1" TabNavigation="Cycle" SelectionChanged="OptionPagesFlipView_SelectionChanged" ItemsSource="{Binding OptionsPageItems}"> <FlipView.ItemTemplate> <DataTemplate x:Name="OptionMonthPageTemplate"> <ScrollViewer x:Name="OptionsScrollViewer" HorizontalScrollMode="Disabled" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto"> <ItemsControl x:Name="OptionItemsControl" ItemsSource="{Binding OptionItems, Mode=OneWay}" Visibility="Collapsed"> <ItemsControl.ItemTemplate> <DataTemplate x:Name="OptionsChainItemTemplate"> <Grid x:Name="OptionItemGrid" Background="#FF9DBDF7" HorizontalAlignment="Stretch"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <!-- CALL BID --> <TextBlock Text="Bid" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallBidTextBlock" Text="{Binding CallBid}" Foreground="Blue" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="0" Margin="5,0,5,5" FontSize="18"/> <!-- CALL ASK --> <TextBlock Text="Ask" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="0" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallAskTextBlock" Text="{Binding CallAsk}" Foreground="Blue" HorizontalAlignment="Left" Grid.Row="3" Grid.Column="0" Margin="5,0,5,0" FontSize="18"/> <!-- CALL LAST --> <TextBlock Text="Last" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallLastTextBlock" Text="{Binding CallLast}" Foreground="Blue" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1" Margin="5,0,5,5" FontSize="18"/> <!-- CALL NET CHANGE --> <TextBlock Text="Net Ch" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallNetChTextBlock" Text="{Binding CallNetChange}" Foreground="{Binding CallNetChangeForeground}" HorizontalAlignment="Left" Grid.Row="3" Grid.Column="1" Margin="5,0,5,5" FontSize="18"/> <!-- STRIKE --> <TextBlock Text="Strike" Foreground="Gray" HorizontalAlignment="Center" Grid.Row="1" Grid.Column="2" FontSize="18" Margin="5,0,5,0"/> <Border Background="{Binding StrikeBackground}" HorizontalAlignment="Center" Grid.Row="2" Grid.Column="2" Margin="5,0,5,5"> <TextBlock x:Name="StrikeTextBlock" Text="{Binding Strike}" Foreground="Blue" FontSize="18"/> </Border> <!-- PUT LAST --> <TextBlock Text="Last" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="3" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="PutLastTextBlock" Text="{Binding PutLast}" Foreground="Blue" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="3" Margin="5,0,5,5" FontSize="18"/> <!-- PUT NET CHANGE --> <TextBlock Text="Net Ch" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="3" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="PutNetChangeTextBlock" Text="{Binding PutNetChange}" Foreground="{Binding PutNetChangeForeground}" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3" Margin="5,0,5,5" FontSize="18"/> <!-- PUT BID --> <TextBlock Text="Bid" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="4" FontSize="18" Margin="5,0,15,0"/> <TextBlock x:Name="PutBidTextBlock" Text="{Binding PutBid}" Foreground="Blue" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="4" Margin="5,0,15,5" FontSize="18"/> <!-- PUT ASK --> <TextBlock Text="Ask" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="4" FontSize="18" Margin="5,0,15,0"/> <TextBlock x:Name="PutAskTextBlock" Text="{Binding PutAsk}" Foreground="Blue" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="4" Margin="5,0,15,5" FontSize="18"/> <!-- BOTTOM LINE SEPARATOR--> <Rectangle Fill="Black" Height="1" Grid.ColumnSpan="5" VerticalAlignment="Bottom" Grid.Row="3"/> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> <!--<Grid> <Grid.RowDefinitions> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <ProgressRing x:Name="CustomProgressRing" Height="40" Width="40" IsActive="true" Grid.Column="0" Margin="20" Foreground="White"/> <TextBlock x:Name="CustomTextBlock" Height="auto" Width="auto" FontSize="25" Grid.Column="1" Margin="20"/> <Border BorderBrush="#FFFFFF" BorderThickness="1" Grid.ColumnSpan="2"/> </Grid>--> </ScrollViewer> </DataTemplate> </FlipView.ItemTemplate>

    Read the article

  • Fullscreen HTML Element using window.innerHeight/Width different with DOCTYPE

    - by CryptoQuick
    I'm trying to make an HTML5 canvas element fullscreen with the window.innerHeight and innerWidth properties. Unfortunately, on Chrome 10, when I set use the following doctype: <!DOCTYPE HTML> ...there is some extra scrolling space indicated by scroll bars which shouldn't appear. Without a doctype, everything is fine. The element is an HTML5 canvas, so styling with 100% will only stretch the content. Is it worth using a doctype which breaks my functionality (without which might be bad?), or should I subtract, say, 15px from the values in order to keep scroll bars from appearing? (which is kludgy)

    Read the article

  • Path vs GeometryDrawing

    - by Carlo
    Just wondering what's lighter, I'm going to have a control that draws 280 * 4 my SegmentControl, which is a quarter of a circle, and I'm just wondering what's the way that takes least memory to draw said segment. GeometryDrawing: <Image> <Image.Source> <DrawingImage> <DrawingImage.Drawing> <GeometryDrawing Brush="LightBlue" Geometry="M24.612317,0.14044853 C24.612317,0.14044853 33.499971,-0.60608719 41,7.0179795 48.37642,14.516393 47.877537,23.404541 47.877537,23.404541 L24.60978,23.401991 z" /> </DrawingImage.Drawing> </DrawingImage> </Image.Source> </Image> Or Path: <Path Fill="LightBlue" Stretch="Fill" Stroke="#FF0DA17D" Data="M24.612317,0.14044853 C24.612317,0.14044853 33.499971,-0.60608719 41,7.0179795 48.37642,14.516393 47.877537,23.404541 47.877537,23.404541 L24.60978,23.401991 z" /> Or if you know of an even better way, it'll be much appreciated. Thanks!

    Read the article

  • Problem getting the background image of a form

    - by Deumber
    I'm creating a datagridview transparent //I got the parent background image Bitmap parentBackGround = new Bitmap(this.Parent.BackgroundImage); //Set the area i want to create equal to the size of my grid Rectangle rect = new Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height); //And draw in the entire grid the area of the background image that is cover with my grid, making a "transparent" effect. graphics.DrawImage(parentBackGround.Clone(rect, PixelFormat.Format32bppRgb), gridBounds); When the backgroundimage of the grid's parent is show in an normal layout all work ok, but if the layout is stretch, center or any other, the transparency effent gone, have you any idea to fix it?

    Read the article

  • What should be the image resolution for Nexus One or Droid?

    - by sunil
    Hi, As Android supports multiple devices from different manufacturers there are different screen resolutions supported. The table that is available at http://developer.android.com/intl/fr/guide/practices/screens_support.... is not very clear to me. It shows WVGA and FWVGA in MDPI for Large Screens and HDPI for Normal screens. So, if the image is kept in drawable-mdpi and its resolution is 320 * 480 then which image will be taken by Large Screens device of MDPI. Moreover, there are two screen resolutions for HDPI i.e. 480 * 800 and 480 * 854. So, with what screen resolution the image should be built. I want to place the background image which looks distorted in WVGA emulator since its resolution is 320 * 480. I have read about nine patchable images but I think they are better for button images and edittext images so that they can stretch according to the data in it. Can someone please guide me in this? Regards Sunil

    Read the article

  • How to validate a ComboBox programatically?

    - by PhOeNiX
    How can i validate a ComboBox for null entry? My combobox is in a model as i am generating it dynamically. Now what i want is that when the the columns are generated dynamically, the border of combobox should be red as no value is selected and once the value is selected the border shud become normal. The following is my combobox in model : DataGridTemplateColumn dataGridComboBoxTemplateColumnObj = new DataGridTemplateColumn(); dataGridComboBoxTemplateColumnObj.Header = column.Header; FrameworkElementFactory comboBoxFactory = new FrameworkElementFactory(typeof(ComboBox)); Binding bindingItemSourceObj = new Binding(column.ItemsSourcePropertyName); comboBoxFactory.SetValue(ComboBox.HorizontalAlignmentProperty, HorizontalAlignment.Stretch); comboBoxFactory.SetValue(ComboBox.ItemsSourceProperty, bindingItemSourceObj); comboBoxFactory.SetValue(ComboBox.SelectedValuePathProperty, column.ValuePropertyName); dataGridComboBoxTemplateColumnObj.CellTemplate = new DataTemplate(); dataGridComboBoxTemplateColumnObj.CellTemplate.VisualTree = comboBoxFactory;

    Read the article

  • Are fluid websites worth making anymore?

    - by Adam
    Hey guys, I'm making a website now and I am trying to decide if I should make it fluid or not. Fixed width websites are much easier to make and also much easier to make them appear consistent. To be honest though, I personally prefer looking at fluid websites that stretch to the full width of my monitor. My question comes from the fact that in most modern browsers you can hold control and scroll your mouse wheel to basically resize any website. So is creating a fluid website worth the trouble?

    Read the article

  • how to format the data inside the DataGridTemplateColumn in datagrid

    - by prince23
    hi, this is my xaml code where i have 2 fields placed under one template column. now i am getting the format the output like this so that i can specify the space betweeen these 2 columns Color red image1 green image2 green image2 white image6 so that output looks good. How can i define space between them so that it looks like the above one right now thw output is like this color Redimage1 greenimage2 greenimage2 whiteimage6 <sdk:DataGridTemplateColumn Header="Color" Width="80"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Loaded ="StackPanel_Loaded" Orientation="Horizontal" Background="Transparent"> <TextBlock Text="{Binding Color}" TextWrapping="NoWrap" HorizontalAlignment="Center" Foreground="Blue"></TextBlock> <Image x:Name="imgTargetScore" Source ="{Binding ColorImage}" Width="20" Height="20" Stretch ="Fill"/> </StackPanel> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> loking forward for an solution thanks in advance prince

    Read the article

  • Is there a way to morph / convert a circular sprite into a square programmatically?

    - by John
    I have a sprite which is basically just an image of a circle and some content inside. Is there a way that I can programmatically stretch / distort it into something like: I don't care so much about the distortion. The original circular image is 100x100px, and the modified image should also be 100x100px. So its really the content that is being distorted. Can this be done using shaders or some other programmatic way ? The initial circular image is most likely determined at run time, which is why I need to programmatically convert the circular sprite to square. Please do not edit the tags, as the question applies to both versions of cocos2d (iPhone & x), and the solution will most likely work in both regardless of whether one uses C or C++ since the apis are similar, and OpenGL commands work similarly.

    Read the article

  • Background image for navigation view (iPhone)

    - by Mladen
    Hi Guys, I am having problems with properly displaying background image of navigation view. Here is the pic: Here is the code: (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:style]) { UIImage *image = [UIImage imageNamed: @"bg_table_active.png"]; UIImageView *imageview = [[UIImageView alloc] initWithImage: image]; UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Settings", @"") style:UIBarButtonItemStyleDone target:self action:@selector(GoToSettings)]; self.navigationItem.titleView = imageview; self.navigationItem.rightBarButtonItem = addButton; self.navigationItem.hidesBackButton = TRUE; } return self; } How to make the picture stretch to whole navigation view?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >