Search Results

Search found 1557 results on 63 pages for 'horizontal'.

Page 49/63 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • How should I progressively enhance this content with JavaScript?

    - by Sean Dunwoody
    The background to this problem is that I'm doing a computing project which involves Some drop down boxes for input, and a text input where the user can input a date. I've used YUI to enhance the form, so the calendar input uses the YUI calendar widget and the drop down list is converted into a horizontal list of inputs where the user only has to click once to select any input as opposed to two clicks with the drop down box (hope that makes sense, not sure how to explain it clearly) The problem is, that in the design section of my project I stated that I would follow the progressive enhancement principles. I am struggling however to ensure that users without JavaScript are able to view the drop down box / text input on said page. This is not because I do not necessarily know how, but the two methods I've tried seem unsatisfactory. Method 1 - I tried using YUI to hide the text box and drop down list, this seemed like the ideal solution however there was quite a noticeable lag when loading the page (especially for the first time), the text box and drop down list where visibile for at least a second. I included the script for this just before the end of the body tag, is there any way that I can run it onload with YUI? Would that help? Method 2 - Use the noscript tag . . . however I am loathed to do this as while it would be a simple solution, I have read various bad things about the noscript tag. Is there a way of making mehtod one work? Or is there a better way of doing this that I am yet to encounter?

    Read the article

  • Mootools Javascript can't push to array

    - by nona
    I have an array set with the heights of each hidden div, but when I use it, the div instantly jumps down, rather than slowly sliding as when there is a literal number. EDIT: testing seems to reveal that it's a problem with the push method, as content_height.push(item.getElement('.moreInfo').offsetHeight);alert(content_height[i]);gives undefined, but alert(item.getElement('.moreInfo').offsetHeight); gives the correct values Javascript: window.addEvent('domready', function(){ var content_height = [];i=0; $$( '.bio_accordion' ).each(function(item){ i++; content_height.push( item.getElement('.moreInfo').offsetHeight); var thisSlider = new Fx.Slide( item.getElement( '.moreInfo' ), { mode: 'horizontal' } ); thisSlider.hide(); item.getElement('.moreInfo').set('tween').tween('height', '0px'); var morph = new Fx.Morph(item.getElement( '.divToggle' )); var selected = 0; item.getElement( '.divToggle' ).addEvents({ 'mouseenter': function(){ if(!selected) this.morph('.div_highlight'); }, 'mouseleave': function(){ if(!selected) { this.morph('.divToggle'); } }, 'click': function(){ if (!selected){ if (this.getElement('.symbol').innerHTML == '+') this.getElement('.symbol').innerHTML = '-'; else this.getElement('.symbol').innerHTML = '+'; item.getElement('.moreInfo').set('tween', { duration: 1500, transition: Fx.Transitions.Bounce.easeOut }).tween('height', content_height[i]); //replacing this with '650' keeps it smooth selected = 1; thisSlider.slideIn(); } else{ if (this.getElement('.symbol').innerHTML == '+') this.getElement('.symbol').innerHTML = '-'; else this.getElement('.symbol').innerHTML = '+'; thisSlider.slideOut(); item.getElement('.moreInfo').set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut }).tween('height', '0px'); selected = 0; } } }); } ); }); Why could this be? Thanks so much!

    Read the article

  • SL3 Grid RowDefinition Height Problem

    - by Chris
    I have a parent grid that contains multiple row definitions, all of which have their height set to 'auto'. Within the parent grid are individual grids - each individual grid contains a custom content control. When the custom content control loads, the height may increase. What I am noticing is that when the height does increase, the content overlaps with the content in other rows. I have specified the horizontal and vertical alignments - am I missing something? Here is an example: <Grid x:Name="LayoutRoot"> <Grid x:Name="ParentGrid>"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid Grid.Row="0"> <CustomContentControl/> </Grid> <Grid Grid.Row="1"> <CustomContentControl/> </Grid> <Grid Grid.Row="2"> <CustomContentControl/> </Grid> </Grid> </Grid>

    Read the article

  • context.Scale() with non-aspect ratio preserving parameters screws effective lineWith

    - by rrenaud
    I am trying to apply some natural transformations whereby the x axis is remapped to some very small domain, like from 0 to 1, whereas y is remapped to some small, but substantially larger domain, like 0 to 30. This way, drawing code can be nice and clean and only care about the model space. However, if I apply a scale, then lines are also scaled, which means that horizontal lines become extremely fat relative to vertical ones. Here is some sample code. When natural_height is much less than natural_height, the picture doesn't look as intended. I want the picture to look like this, which is what happens with a scale that preserves aspect ratio. rftgstats.c om/canvas_good.png However, with a non-aspect ratio preserving scale, the results look like this. rftgstats.c om/canvas_bad.png <html><head><title>Busted example</title></head> <body> <canvas id=example height=300 width=300> <script> var canvas = document.getElementById('example'); var ctx = canvas.getContext('2d'); var natural_width = 10; var natural_height = 50; ctx.scale(canvas.width / natural_width, canvas.height / natural_height); var numLines = 20; ctx.beginPath(); for (var i = 0; i < numLines; ++i) { ctx.moveTo(natural_width / 2, natural_height / 2); var angle = 2 * Math.PI * i / numLines; // yay for screen size independent draw calls. ctx.lineTo(natural_width / 2 + natural_width * Math.cos(angle), natural_height / 2 + natural_height * Math.sin(angle)); } ctx.stroke(); ctx.closePath(); </script> </body> </html>

    Read the article

  • How to set margin for inner controls of WrapPanel

    - by Andrey Tagaew
    Hi Guys! I'm new in WPF and have a question. Here is an example that I'm using: <Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <StackPanel> <WrapPanel Orientation="Horizontal" > <Button Content="test1" Margin="10,0" Padding="10,10" /> <Button Content="test2" Margin="10,0" Padding="10,10" /> <Button Content="test3" Margin="10,0" Padding="10,10" /> <Button Content="test4" Margin="10,0" Padding="10,10" /> <Button Content="test5" Margin="10,0" Padding="10,10" /> </WrapPanel> </StackPanel> As you can see, my wrap panel has several buttons. Each button has the same margin and padding. The question is, is there a way of setting margin and padding for wrap panel, so each element inside the wrap panel may use it values? This make the code shorter and let me specify Margin and Padding only one time instead of setting it for each control in the panel. Thank you!

    Read the article

  • WPF - Extend ListView with checkable AND selectable ListViewItems

    - by Marks
    Hi there. I already read many examples on extending ListViews with checkboxes bound with IsSelected. But I want something more. I want a seperation between the checked and selected state, so i get a ListBox that has a single selected item, but can have multiple checked items. Unfortunately ListViewItem does not have a property for checked and I dont see a possibility to get the ListView to work with a custom CheckableListViewItem. Of course i could use a List of objects with a checked property as ItemSource, but I dont think thats a good way to go. Checked or not is a matter of the list or item-container, not of the object listed in it. Beside that I dont want all my classes like user, role, group to have counterparts like checkableUser, checkableRole and checkableGroup. The behaviour i want can be easyly accomblished for the UI with a <DataTemplate x:Key="CheckBoxCell"> <StackPanel Orientation="Horizontal"> <CheckBox /> </StackPanel> </DataTemplate> and a <GridViewColumn CellTemplate="{StaticResource CheckBoxCell}" Width="30"/> But without a binding on the checkbox i cant check if it is checked or not. Is there any way to accomplish something like that? The perfect solution for me would be to have listView1.SelectedItem, listView1.CheckedItems and maybe a listView1.UncheckedItems and of course listView1.CheckItem and listView1.UncheckItem. Thanks for any help.

    Read the article

  • Labels aren't shown properly in combo box

    - by Vishal
    The below code show the labels from previously selected list any ideas? Steps to reproduce: Click on List AB Open the list but don't select / click any item Now click on List CD Open the list again and you see A, B as labels instead of C,D but if you click on any item then everything comes properly <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; public var ab:ArrayCollection=new ArrayCollection([{label: A, data: 1}, {label: B, data: 2}]); public var cd:ArrayCollection=new ArrayCollection([{label: C, data: 3}, {label: D, data: 4}]); private function abClick(event:Event):void { cb.dataProvider=ab; } private function cdClick(event:Event):void { cb.dataProvider=cd; } ]]> </mx:Script> <mx:Panel title="ComboBox Control Example" height="75%" width="75%" layout="horizontal" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"> <mx:ComboBox id="cb" width="150"/> <mx:Button label="List AB" click="abClick(event);"/> <mx:Button label="List CD" click="cdClick(event);"/> </mx:Panel>

    Read the article

  • Moving Multiple Divs With Same Class Inside Parent

    - by superzilla
    So, My website is hosted on enjin.com and when you give users a tag with an image it appears on the forums under their name, however it's a vertical list with the tag names. I want to organize it so all of the tag images appear on one line and all of the tag names appear on a horizontal list below it. They use div tags somewhat like this <div class="tag"> <div class="tag-image"></div> <!-- If the tag lacks an image this is excluded --> <div class="tag-text">Tag Name</div> <!-- If you want the name to be hidden this is excluded --> </div> They then pretty much repeat this for every tag. Somewhat the same thing is used for forum posts too. So, I want to move all the tag-image divs together on a single line and all of the tag-text divs down and give each it's own line. I only want to move them within their parent element (to avoid images/tags from one forum user from going to another). I know how to append things with jquery and have googled how to move elements around, but I'm afraid that they're all going to end up together under another user's avatar.

    Read the article

  • How to Implement Custom List View for the list Items in Android Application

    - by avadhani
    I had a problem with the list view having both parent list and the child list of the list activity(implemented through database query). I wish to show them differing their properties by changing the text style (parent list items are in bold, child list items are in normal style). The following is the code from which all the child and parent list items having the same style(bold): String sql = "SELECT Parentid,Childid,Name from (select com.Parentid, com.Childid, com.Name from table1 mem inner join table2 cd on mem.column1=cd.column1 inner join table3 com on com.childid = mem.childid where Parentid is NULL UNION SELECT com.Parentid, com.Childid,com.Name from table1 mem inner join table3 com on com.childid = mem.childid inner join table2 cd on mem.column1=cd.column1 where Parentid is NOT NULL) a group by Parentid, Childid;"; Cursor cdata = myDbHelper.getView(sql); and the List Adapter is: private static final String fields[] = {"Name"}; int[] names = new int[] {R.id.name}; SimpleCursorAdapter adapter2 = new SimpleCursorAdapter(this,R.layout.clientlist1, cdata, fields,names ); and the clientlist.xml is: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/MainLayout" android:padding="5px"> <TextView android:id="@+id/name" android:layout_alignParentRight="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="12sp" android:textColor="#104082" android:textStyle="bold" android:layout_weight="1" /> From this i am getting the list having the complete list having both parent and child list items in a single list view. I wish to differ in their text style(bold, normal) for parent and child items respectively. Please help me with the code/links. Thanks a lot in advance.

    Read the article

  • Problem shrinking with StretchBlt()

    - by SparkyNZ
    Hi. I have some code that paints my own rectangular buttons based on a source bitmap. Most of the time the destination buttons are bigger than my source bitmap image and StretchBlt works fine. However, when the destination is smaller than the source image, StretchBlt refuses to fill the entire destination area. I know StretchBlt isn't great on quality when it comes to scaling down images but I'm not too concerned about that. I just don't want missing pixels. Here a link with the source image at the top and destination at the bottom: link text Note, I am actually shrinking parts of the source image into the destination. I am not shrinking the entire image down. So for example, I copy the corners size for size with BitBlt() then I stretch (squash) the horizontal pixel data between the corners from the source image into the destination DC. There is no fault with my source and destination coordinates. If I change from SRCCOPY to WHITENESS, the entire area fills with white as you'd expect. There is no grey bar where pixels haven't copied as you see in the Broken.bmp image above. Has anyone had this problem before, and if so, can somebody please suggest a solution? Cheers

    Read the article

  • Gridview looses ItemTemplate after columns are removed

    - by Middletone
    I'm trying to bind a datatable to a gridview where I've removed some of the autogenerated columns in the code behind. I've got two template columns and it seems that when I alter the gridview in code behind and remove the non-templated columns that the templates loose the controls that are in them. Using the following as a sample, "Header A" will continue to be visible but "Header B" will dissapear after removing any columsn that are located at index 2 and above. I'm creating columns in my codebehind for the grid as a part of a reporting tool. If I don't remove the columns then there doesn't seem to be an issue. <asp:GridView ID="DataGrid1" runat="server" AutoGenerateColumns="false" AllowPaging="True" PageSize="10" GridLines="Horizontal"> <Columns> <asp:TemplateField HeaderText="Header A" > <ItemTemplate > Text A </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <HeaderTemplate> Header B </HeaderTemplate> <ItemTemplate> Text B </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> For i = 2 To DataGrid1.Columns.Count - 1 DataGrid1.Columns.RemoveAt(2) Next EDIT So from what I've read this seems to be a problem that occurs when the grid is altered. Does anyone know of a good workaround to re-initialize the template columns or set them up again so that when the non-template columns are removed that hte templates don't get removed as well?

    Read the article

  • iphone - why is this flip animation using layers not working?

    - by Digital Robot
    I would like to make an animation that goes like this: imagine a picture sitting on a shelve. It drops from the shelve and as it falls it rotates along the horizontal axis and translates along the vertical axis. I would like to do this with perspective and the back side should be the image reversed, like the picture is a kind of slide. I have done this: CALayer* layer = myImageView.layer; layer.doubleSided = YES; CAKeyframeAnimation* animationTransform = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; CATransform3D startTransform = CATransform3DIdentity; CATransform3D endTransform = CATransform3DTranslate (layer.transform, 0.0f, 200.0f, 0.0f); endTransform = CATransform3DRotate (endTransform, degreesToRadian(350.0f), 1.0f, 0.0f, 0.0f); endTransform.m34 = 1.0 / -500; NSArray *values = [NSArray arrayWithObjects: [NSValue valueWithCATransform3D:startTransform], [NSValue valueWithCATransform3D:endTransform], nil]; [animationTransform setValues:values]; NSArray *tempos = [NSArray arrayWithObjects: [NSNumber numberWithFloat:0.0f], [NSNumber numberWithFloat:0.7f], nil]; [animationTransform setKeyTimes:tempos]; NSArray *timing = [NSArray arrayWithObjects: [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut], nil]; [animationTransform setTimingFunctions:timing]; animationTransform.fillMode = kCAFillModeRemoved; animationTransform.removedOnCompletion = YES; animationTransform.repeatCount = 1; animationTransform.duration = 3.7f; animationTransform.cumulative = YES; the result of this has nothing to do with anything. The result is: the image translates down an inch on the screen and then up half inch. Then it disappears and appears at its starting position again. What am I missing? thanks

    Read the article

  • StackPanel loded is not getting fired in.cs page

    - by prince23
    <sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Loaded ="SPImage_Loaded" Orientation="Horizontal" Background="Transparent" > <Button x:Name="myButton" Click="Btn_Click"> <Image x:Name="imgMarks" " Stretch="None"/> </Button> </StackPanel> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> in .cs i have defined the event for stack panel private void SPImage_Loaded(object sender, RoutedEventArgs e) { try { var TargetMarks = sender as StackPanel; Image imgMarks= (Image)TargetScore.FindName("imgMarks"); Marks obj = (Marks )TargetMarks.DataContext; // here marks oject would be containg the details // here if marks.score object value is 1 then bind the image //else // dnt bind the image . that is logic i am trying to do. imgMarks.Source = new BitmapImage(new Uri("/Images/a1.png", UriKind.Relative)); } catch (Exception) { throw; } } any solution on this would be great. is there any better solution to achive this. plz help me out. thank you.

    Read the article

  • Converting image to Black & White image on iPhone SDK issues.

    - by KfirS
    Hello, I've used a familiar code to convert image to Black & White which I've founded on several forums. The code is: CGColorSpaceRef colorSapce = CGColorSpaceCreateDeviceGray(); CGContextRef context = CGBitmapContextCreate(nil, originalImage.size.width, originalImage.size.height, 8, originalImage.size.width, colorSapce, kCGImageAlphaNone); CGContextSetInterpolationQuality(context, kCGInterpolationHigh); CGContextSetShouldAntialias(context, NO); CGContextDrawImage(context, CGRectMake(0, 0, originalImage.size.width, originalImage.size.height), [originalImage CGImage]); CGImageRef bwImage = CGBitmapContextCreateImage(context); CGContextRelease(context); CGColorSpaceRelease(colorSapce); UIImage *resultImage = [UIImage imageWithCGImage:bwImage]; // This is result B/W image. CGImageRelease(bwImage); return resultImage; When I'm using this code with on Horizontal image it's work fine, but when I'm trying a to use this code on Vertical image, the result is disproportionate image and rotate 90 degree left. Can anyone know what could be the problem? Thanks, Kfir.

    Read the article

  • How to make a div extend when floating it?

    - by cjmcjm
    I'm trying to create a bar with a dynamic horizontal width. The backgrounds are transparent pngs so they can't overlap. I have one for the left side, one to repeat-x across the dynamic width middle and then another bg for the right. Here is kinda what I have so far... .bar{ width: 100%; } .left{ width: 50px; height: 50px; float: left; } .mid{ height: 50px; float: left; } .right{ width: 50px; height: 50px; float: right; } <div class="bar"> <div class="left"></div> <div class="mid"></div> <div class="right"></div> </div> So the main problem is extending the .mid all the way across to meet the right, width: 100% doesn't work. The other problems is what can I do if I have content that needs to overlap the .left and .mid divs? Set up another div and use z-index? Thanks so much!

    Read the article

  • Flex customized Horizental List

    - by muzammal
    i have customized Horizontal List (items are image and some text) of a reel with some no of clips . i have customized highlight , un highlight and select style , which will be implemented dynamically and mouse over and out. now pproblem is to make un highlight previously playing clip. enter code here styleName="unhighlightedClip" updateComplete="currentlyPlaying();" rollOver="highlighted();" rollOut="unhighlighted();" .currentlyPlayingClip{ borderColor: #95123E; borderStyle: solid; borderThickness: 2; } .unhighlightedClip{ borderStyle: none; } .highlightedClip{ borderColor: #70BAE7; borderStyle: solid; borderThickness: 2; } </mx:Style> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.controls.HorizontalList; private var prevIndex:int = -1; protected function unhighlighted():void{ var selected:Boolean = HorizontalList(this.owner).isItemSelected(this.data); clipDesription.useHandCursor = false; clipStartTime.useHandCursor = false; this.useHandCursor = false; if(!selected) this.setStyle('styleName', 'unhighlightedClip'); } protected function highlighted():void{ clipDesription.useHandCursor = true; clipStartTime.useHandCursor = true; this.useHandCursor = true; var selected:Boolean = HorizontalList(this.owner).isItemSelected(this.data); if(!selected) this.setStyle('styleName', 'highlightedClip'); } protected function currentlyPlaying():void{ var selected:Boolean = HorizontalList(this.owner).isItemSelected(this.data); var currentIndex:int = HorizontalList(this.owner).selectedIndex; if(selected) this.setStyle('styleName', 'currentlyPlayingClip'); // else if(prevIndex != currentIndex ) // this.setStyle('styleName', 'unhighlightedClip'); // // prevIndex = currentIndex; } ]]

    Read the article

  • how to create paging in a dynamic gridview

    - by bharathi
    I am using C# ,here i attach my partial code for dynamic grid view its working fine . I need to set paging on the dynamic grid view how can i call the OnPageIndexChanging GridView gv = new GridView(); gv.AllowPaging = false; gv.AlternatingRowStyle.BackColor = System.Drawing.Color.WhiteSmoke; gv.GridLines = GridLines.Horizontal; gv.CellPadding = 2; gv.CellSpacing = 5; gv.HeaderStyle.BackColor=System.Drawing.Color.Black; gv.HeaderStyle.ForeColor = System.Drawing.Color.White; gv.AutoGenerateColumns = false; BoundField nameColumn = new BoundField(); nameColumn.DataField = "fld_id"; nameColumn.HeaderText = "First Name"; gv.Columns.Add(nameColumn); nameColumn = new BoundField(); nameColumn.DataField = "fld_name"; nameColumn.HeaderText = "Last Name"; gv.Columns.Add(nameColumn); nameColumn = new BoundField(); nameColumn.DataField = "fld_state"; nameColumn.HeaderText = "Age"; gv.Columns.Add(nameColumn); gv.DataSource = ds; gv.DataBind(); plangrid.Controls.Add(gv);

    Read the article

  • The Impossible Layout?

    - by Kyle K
    I'm beginning to think this is impossible, but thought I'd ask you guys. Basically it's a 2 column layout, but the "business" wants the following: -Always take up the entire browser window -Accommodate resizing of browser window -Left column will be fixed width, but that width should be flexible from page-to-page. -Left column has a region at the top with fixed height. -Left column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region. -Right column should take up remaining horizontal space of browser window. -Right column has a region at the top with fixed height. -Right column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region. I've tried everything...divs, floated, absolutely positioned, tables, divs in tables... Is this even possible? Here's an image of what it should look like: http://imgur.com/zk1jP.png

    Read the article

  • itearation through gridview

    - by user1405508
    I want to get cell value from gridview,but empty string is returned .I am implemented code in selectedindexchanged event of radiobuttonlist .I iterate through gridview and access cell by code .but problem is stll remaining.I used three itemtemplate ,each has one elemnt so that each element get its own coulmn .aspx <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="false" > <Columns> <asp:Label ID="Label2" runat="server" Text='<%# Eval("qno") %>'> </asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="Label3" runat="server" Text='<%# Eval("description") %>'> </ItemTemplate> </asp:TemplateField> <asp:RadioButtonList ID="RadioButtonList1" RepeatDirection="Horizontal" runat="server" OnSelectedIndexChanged="changed" AutoPostBack="true" > <asp:ListItem Value="agree" Selected="True" > </asp:ListItem> <asp:ListItem Value="disagree"> </asp:ListItem> <asp:ListItem Value="strongagree"> </asp:ListItem> <asp:ListItem Value="strondisagree"> </asp:ListItem> </asp:RadioButtonList> </Columns> </asp:GridView> <asp:Label ID="Labe11" runat="server" ></asp:Label> Code behind: public void changed(object sender, EventArgs e) { for(int i=0;i<GridView2.Rows.Count;i++) { string labtext; RadioButtonList list = GridView2.Rows[i].Cells[2].FindControl("RadioButtonList1") as RadioButtonList; labtext= GridView2.Rows[i].Cells[0].Text; Label1.Text = labtext; } }

    Read the article

  • Should I be using Expression Blend to design really dynamic UIs?

    - by Robert Rossney
    My company's product is, at its core, a framework for developing metadata-driven UIs. I don't know how to characterize it less succinctly than that, and hope I won't need to for purposes of this question, but we'll see. I've been trying to come up to speed on WPF, and have been building UI prototypes here and there, and recently I decided to see if I could use Expression Blend to help with the design of these UIs. And I'm pretty mystified at this point. It appears to me as though Expresssion Blend is designed with the expectation that you already know all of the objects that are going to be present in the UI at design time. But our program generates these object dynamically at runtime. For instance, a data row might be presented in a horizontal StackPanel containing alternating TextBlocks (for captions) and TextBoxes (for data fields). The number of these objects depends on metadata about the number of columns in the data row. I can, pretty readily, write code that runs through a metadata record and populates a StackPanel dynamically, setting up the binding of all of the controls to properties in either the data or metadata. (A TextBox's Width might be bound to metadata, while its Text is bound to data.) But I can't even begin to figure out how to do something like this in Expression Blend. I can manually create all these controls, so that I have a set of controls that I can apply styles to and work out the visual design of the app, but it's really a pain to do this. I can write code that goes through my data model and emits XAML for all these controls, I suppose, and then copy and paste it. But I'm going to feel really stupid if it turns out there a way to do this sort of thing in Expression Blend and I've dropped back and punted because I'm too dim to figure out the right way to think of it. Is this enough information for someone to try formulating an answer?

    Read the article

  • Windows 7 Mobile ListBox uncustomizable?

    - by Roy
    I've just recently started development using Visual Studio 2010 Express for Windows Phone and I put in a ListBox. I can't seem to manipulate the formatting. No matter what I do, the background is black/gray, the selected items have a blue border, and there is padding between the items in the listbox (i'm using images). Here is my code: Xaml: <Grid x:Name="ContentGrid" Grid.Row="1"> <Grid Name="gallery"> <Grid.RowDefinitions> <RowDefinition Height="370" /> <RowDefinition Height="150" /> </Grid.RowDefinitions> <Border BorderBrush="Red" Width="450" CornerRadius="4" BorderThickness="2" Background="Red" Margin="10,30,20,10" Padding="6,6,6,6"> <Image Grid.Row="0" Grid.Column="0" Height="360" x:Name="imgPreview"/> </Border> <ListBox x:Name="lbScrollGallery" Grid.Row="1" Grid.Column="0" Padding="0" VerticalAlignment="Top" Width="450" SelectionChanged="ScrollerSelectionChanged" d:LayoutOverrides="HorizontalAlignment" ScrollViewer.HorizontalScrollBarVisibility="Hidden"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal"/> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <Image Width="100" Height="100" Stretch="Fill" Name="imgSource" VerticalAlignment="Center" Source="{Binding Path=Url}" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> </Grid> Is there some way I can customize the listbox? Like change the background to red or make the padding between different items 0?

    Read the article

  • Unable to set row height for grid view

    - by GabrielHeng
    I tried to set a row height for each row of my grid view in visual studio. However, it does not work. The row height will not change according to the pixel that I typed in. Here is my codes. <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="productID" DataSourceID="SqlDataSource1" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal" Width = "850px" style="margin-bottom: 6px" RowStyle-Height="50px"> <AlternatingRowStyle Height="50px" /> <Columns> <asp:CommandField ButtonType="Button" ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="productID" HeaderText="ProductID" ReadOnly="True" SortExpression="productID" /> <asp:BoundField DataField="title" HeaderText="Title" SortExpression="title" /> <asp:BoundField DataField="description" HeaderText="Description" SortExpression="description" /> <asp:BoundField DataField="price" HeaderText="Price" SortExpression="price" /> <asp:ImageField DataImageUrlField="image" HeaderText="Images" SortExpression="image" DataImageUrlFormatString="~/images/{0}"> </asp:ImageField> </Columns> <FooterStyle BackColor="#CCCC99" ForeColor="Black" /> <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" /> <SortedAscendingCellStyle BackColor="#F7F7F7" /> <SortedAscendingHeaderStyle BackColor="#4B4B4B" /> <SortedDescendingCellStyle BackColor="#E5E5E5" /> <SortedDescendingHeaderStyle BackColor="#242121" /> </asp:GridView> May someone help me with it? Thanks in advance.

    Read the article

  • jquery .show("slide") options (WITH PICS!!)

    - by Micky Fokken
    Here's my code. It slides in from the left. <script> $('#goalHS').click(function() { $('div[id^="div-detailed-goal"]').show("slide"); }); $("#redline").click(function() { $('div[id^="div-detailed-goal"]').fadeOut("slow"); }); </script> Instead of fading in from the left, I want a red line to be drawn and then have the DIV slide in from the top. How can I get it to do the following? Horizontal red line grows out from center. --- Red line finishes growing: Content slides in from underneath red line. COntent does NOT show above red line: c. content, content, content d. content, content, content Content finishes sliding in. Awesomeness ensues! a. content, content, content b. content, content, content c. content, content, content d. content, content, content I've tried 4 different ways, and I've tried using other js plugin libraries, but I'm not quite that advanced to figure it out.

    Read the article

  • Anchors with overlapping divs

    - by tmdelane
    I am using a grid based layout, with two main sections. Graph and Timeline. Graph, contains graded vertical bars, HTML similar to: <div id="graph" class="container_160"> <div id="Jan-97" class="grid_1 major"><a href="#">&nbsp;</a></div> <div id="Feb-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> <div id="Mar-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> <div id="Apr-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> <div id="May-97" class="grid_1 minor"><a href="#">&nbsp;</a></div> etc... </div> Timeline, contains horizontal bars, HTML similar to: <div id="timeline" class="container_160"> <div id="bar1" class="grid_32 suffix_128"><a href="#">&nbsp;</a></div> <div id="bar2" class="prefix_32 grid_24 suffix_104"><a href="#">&nbsp;</a></div> <div id="bar3" class="prefix_58 grid_7 suffix_95"><a href="#">&nbsp;</a></div> </div> Timeline is relatively positioned to Graph so that it overlaps. My problem is that when these divs overlap, the anchors in Timeline stop working. I am open to both CSS and Jquery solutions. Thanks in advance. t.

    Read the article

  • Adapting the width of a Flexs 3 DataGridColumn to the content of its ItemRenderer ?

    - by phtrivier
    I have the following scenario : A Flex 3 DataGrid is sitting here At runtime, a column is added to this grid The column has a custom ItemRenderer The ItemRenderer inherits from HBox, and adds a few items to the HBOx dynamically My problem is that the width of the column doesn't change. As a consequence, my column stays small, and an ugly horizontal scrollbar is displayed in the line, instead of my content (which is completely unreadable). I would like the column to adapt its width to the content of the HBox in the ItemRenderer. I tried the following : Setting the 'percentWidth' of the ItemRenderer to '100' Invalidating the properties of the ItemRenderer after adding the items The only thing that has a "visible" effect it to force the width of the DataGridColumn. Obviously this is not acceptable since I'm dynamically adding components to the ItemRenderer, and I don't know how many or how big they are. Besides, when I am in the ItemRenderer, I have no access to the column itself (or do I ?) so I cannot force the size of the column from here. So is there a way around this ? Would AdvancedDataGrid help here (notwhistanding the fact that I cannot really use it for other reasons ...) Thanks PH

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >