Search Results

Search found 15316 results on 613 pages for 'coding style'.

Page 173/613 | < Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >

  • How to use "if clause" in xhtml?

    - by Mehmet Kaleli
    Hi , i am a newbie C# Programmer. I have a problem in xhtml. I want to check that if browser is IE6 or not. For example if ie6 then div id="div1" style="display:block;" else div id="div1" style="display:none;" How can i control my browser and use if clause in xhtml?

    Read the article

  • TCPDF Specific border for different sides

    - by Metropolis
    Hey Everyone, I just started using TCPDF (output with HTML), and I do not understand why I can not have an inline CSS style for border like the following, style="border-right: 1px" After looking at some of the examples, the only place I see borders being used is on a table using the border="1" property. This is very frustrating, and I hope there is a way for me to use all inline CSS instead of old HTML attributes like "border". Thanks for any help, Metropolis

    Read the article

  • WPF Binding with RelativeSource of Window Requires "DataContext" in Path?

    - by Phil Sandler
    The following code works, but I'm curious as to why I need the Path to be prefixed with "DataContext"? In most other cases, the path used is relative to DataContext. Is it because I am using a RelativeSource? Because the source is at the root level (Window)? <Style TargetType="TextBox"> <Setter Property="IsReadOnly" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.IsReadOnly}"/> </Style>

    Read the article

  • How to align this div contents properly?

    - by Pandiya Chendur
    Here is my layout, I am using one div and many spans for getting the above view... Look at all the rows ther are not properly aligned... <div class="resultsdiv"><br /> <span style="width:200px;" class="resultName">' + employee.Emp_Name + '</span> <span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp; <span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /> <span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span> <span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span> <span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp; <span class="resultfieldvalues">' + employee.Address + '</span> </div> and my css are .resultsdiv { background-color: #FFF;border-top:solid 1px #ddd; height:50px; border-bottom:solid 1px #ddd; padding-bottom:15px; width:450px; } .resultseven { background-color: #EFF1f1; } .resultshover { background-color: #F4F2F2; cursor:pointer; } .resultName { font-size:125%;font-weight:bolder;color:#476275;font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; } .resultfields { font-size:110%;font-weight:bolder;font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; } .resultfieldvalues { color:#476275;font-size:110%;font-weight:bold;font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; } Any suggestion to get it aligned properly.... Should i use divs insted of spans to get this properly aligned...

    Read the article

  • Adding row to Datalist

    - by Scrappy
    I have been searching around the web for a solution to this issue but have come across nothing so far. Basically I have a table as shown below, whhich i made up of itemtemplate fields and is populated by a dataset from my database. It shows brands to the user of which they can then click and go onto another page. I need to add another option to the table called "All Brands". Thus then I can use this to go to a page showing all the brands. However I can not seem to easily add this into the datalist. <asp:DataList id="TypesList" runat="server" Visible="true" RepeatColumns="3" Width="100%" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <div style="position:relative;vertical-align:top;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="center" style="height:170px;vertical-align:top;text-align:center;" valign="top"> <asp:Label ID="lblID" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container.DataItem,"batteryTypeID")%>'></asp:Label> <a href='/<%#DataBinder.Eval(Container.DataItem,"catid")%>/<%#DataBinder.Eval(Container.DataItem,"catname")%>/<%#DataBinder.Eval(Container.DataItem,"brandid")%>/<%#DataBinder.Eval(Container.DataItem,"brand_name")%>/<%#DataBinder.Eval(Container.DataItem,"batteryTypeID")%>/<%#DataBinder.Eval(Container.DataItem,"typeName")%>' target='_self'> <asp:Image ID="imgProd" runat="server" ImageUrl='images/none.jpg' /> </a> </td> </tr> <tr> <td class="productdesc" style="text-align:center;vertical-align:top;"> <span style="color:#000;font-weight:bold;font-size:120%;"> <%#DataBinder.Eval(Container.DataItem, "typeName").ToString%> </span> </td> </tr> </table> </div> </ItemTemplate> </asp:DataList> Thanks in advance for any help

    Read the article

  • Unexpected space between DIV elements, no - not padding and not margins

    - by jon
    my code for the php page displaying the divs <?php session_start(); require_once("classlib/mainspace.php"); if (isset($_SESSION['username'])==FALSE) { header("location:login.php"); } $user = new User($_SESSION['username']); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style/style.css" /> <title>SimpleTask - Home</title> </head> <body> <div id="main"> <div id="menu"> <div id="items"> <ul> <li><a href="home.php">home</a></li> <li>&bull;</li> <li><a href="projects.php">my projects</a></li> <li>&bull;</li> <li><a href="comments.php">my comments</a></li> </ul> </div> <div id="user"> <p>Welcome, <?php echo $user->GetRealName(); ?><br/><a href="editprofile.php">edit profile</a> &bull; <a href="logout.php">logout</a></p> </div> </div> <div id="content"> <h1>HOME</h1> </div> <div id="footer"> <p>footer text goes here here here here</p> </div> </div> </body> </html> and you can find my CSS here http://tasker.efficaxdevelopment.com/style/style.css and to view the live page go here http://tasker.efficaxdevelopment.com/login.php username:admin password:password

    Read the article

  • WPF Treeview: How to display rounded border around the selected item?

    - by chikak
    I am trying to set the rounded border around the selected item of the treeview (like the one in the windows explorer on Vista). The problem is that the trigger in the following code doesn't seem to be working. It looks like the IsSelected property is always false. <TreeView x:Name="m_treeView" BorderThickness="0" d:LayoutOverrides="Width, Height"> <TreeView.Resources> <Style TargetType="TreeViewItem"> <Style.Resources> <Brush x:Key="{x:Static SystemColors.HighlightBrushKey}">Transparent</Brush> </Style.Resources> </Style> </TreeView.Resources> <TreeView.ItemTemplate> <HierarchicalDataTemplate DataType="{x:Type local:DirectoryPresentationBase}" ItemsSource="{Binding Children}"> <TreeViewItem> <TreeViewItem.Header> <Border Name="SelectedBorder" CornerRadius="3" Background="#EFF8FD" BorderBrush="#99DEFD" BorderThickness="1" > <StackPanel Orientation="Horizontal"> <interactivity:Interaction.Behaviors> <local:TreeViewExpandBehavior AssociatedTreeView="{Binding ElementName=m_treeView}"/> </interactivity:Interaction.Behaviors> <Image x:Name="img" Width="24" Height="16" Stretch="None" Source="{Binding SmallIcon}"/> <TextBlock Text="{Binding Name}" Margin="5,0" /> </StackPanel> </Border> </TreeViewItem.Header> </TreeViewItem> <HierarchicalDataTemplate.Triggers> <Trigger Property="TreeViewItem.IsSelected" Value="True"> <Setter Property="Background" TargetName="SelectedBorder" Value="Red"/> <Setter Property="BorderBrush" TargetName="SelectedBorder" Value="Green"/> </Trigger> <Trigger Property="TreeViewItem.IsSelected" Value="False"> <Setter Property="Background" TargetName="SelectedBorder" Value="Transparent"/> <Setter Property="BorderBrush" TargetName="SelectedBorder" Value="Transparent"/> </Trigger> </HierarchicalDataTemplate.Triggers> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView>

    Read the article

  • Javascript: getting element in dom tree when mouseover

    - by oimoim
    Hi, When using : document.onmouseover = function(e) {} Is there a property which gives me the element in the dom tree ? For example, I can set a style to e.srcElement But, how can I later access this element to (for example) reset its style ? And how can I know at which place in the dom tree it is ? I want to be able to situate it in the whole page dump. Many thanks.

    Read the article

  • How to set the button created in the navigation bar as custom in iphone?

    - by Warrior
    I am new to iphone development.I have created a UIBarButtonItem on the navigation bar.I want to set the proper to custom. There is no property as custom for "style:" attribute.Please help me out.Thanks. leftbutton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"LEFT.png"] style:UIBarButtonItemStylePlain target:self action:@selector(leftbutton)]; self.navigationItem.leftBarButtonItem = leftbutton; [self.navigationItem] [leftbutton release];

    Read the article

  • JQUERY Ajax form, page refreshs & isn't supposed to in Safari, doesn't refresh in FF (works fine)

    - by nobosh
    I'm working on a AJAX form which lives in a JQUERY UI Dialog. It works great in FireFox, but for some reason, in safari it refreshes the page to: /? Please let me know if somethings wrong here? Thanks <div class="modal-container"> <form onsubmit="" action="" id="list-dialog-form" name="list-dialog-form"> <div id="modal-wrapper"> <br><br> <div class="modal-inputbar"> <span style="width: 100px;" class="inputbar-label"> <label>Edit List Name:</label> </span> <span style="width: 200px;" class="inputbar-input"> <input type="text" style="padding-right: 25px;" autocomplete="off" maxlength="140" id="listname" value="Untitled"> </span> </div> </div> <div id="modal-submit" class="modal-submit"> <span class="left delete-wrap"> <span onclick="deleteThisList(15);" class="delete"> </span> </span> <span style="line-height: 2em;" class="right"> <input type="hidden" value="15" id="tasklistID"> <input type="submit" value="update" id="dialogcloser"> <input type="button" onclick="$('#listeditdialog').dialog('close');" value="close" id="dialogcloser"> </span> </div> </form> </div> // Handles Updating the List Title $("#list-dialog-form").submit(function(){ // Ajax Spinner $("#listname").css("background", "url('/images/ajax-loader.gif') no-repeat scroll 98% center #FFF"); $.ajax({ url: '/ajax/listname-update/index.cfm', data: ({listname: $("#listname").val().trim(), tasklistID: $("#tasklistID").val()}), dataType: 'json', type: 'post', success: function( result ) { // Update the name in the top, project list $("#list-" + $("#tasklistID").val()).find('a').html($("#listname").val().trim()); $("#list-" + $("#tasklistID").val()).effect('highlight', {color: '#BDC1C7'}, 500); //Remove the Ajax Spinner $("#listname").css("background", "#FFF"); $("#listname").effect('highlight', {color: '#BDC1C7'}, 500); //close the dialog $('#listeditdialog').dialog('close'); } }); return false; });

    Read the article

  • Issue while trying to give a floating effect to a footer bar in IE

    - by Shailesh
    Hi, I'm trying to put a footer bar at the bottom of the browser no matter what the length of the content is. The footer bar should always be visible to the user and should be on the top layer. Following is my code: <html> <head> <style type="text/css"> #wrapper { width: 910px; margin: 0 auto; padding: 0px 20px 50px 20px; text-align: left; } #footer-wrapper { -moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; bottom:0; clear:both; font-size:11px !important; left:0; position:fixed; white-space:nowrap; width:100%; z-index:8000; } </style> <script> var counter = 0; function addContent(ctr) { document.getElementById(ctr).innerHTML=document.getElementById (ctr).innerHTML+" dynaContent"+counter; counter++; } </script> </head> <body> <div> <div><input type="button" onclick="addContent('wrapper')" value="Add dynaContent" /></div> <div id="wrapper" style="color:#FFFFFF; background-color: #111111;"> STATIC TEXT - HEADER-WRAPPER </div> <div style="color:#FFFFFF;background-color: #555555;">STATIC TEXT - FOOTER-WRAPPER</div> </div> </body> </html> It's working fine in Mozilla Firefox and giving the intended results, but, in IE, the footer bar always sticks just under the header. Please help. Thanks in advance, Shailesh.

    Read the article

  • How do I cause the controller buttons to display for an Apple Quicktime video embedded in Firefox?

    - by Doug Treadwell
    I am trying to embed a Quicktime video in Firefox, but when I do the controller buttons do not appear. I've tried both the old style embed tag and the new style object tags, but when I set the "controller" option to true there is no change in the appearance of the plugin. The video loads, but it is zoomed in on some portion of the video and there are no buttons to play, pause, etc.

    Read the article

  • CVS to Mercurial conversion: end of line problem

    - by mizipzor
    I recently converted a CVS repository to Mercurial. From the looks of it, everything went perfect. Except that every end-of-line character is in Unix style and I want them in Windows style. I know the hg convert command can be used to "convert" a Mercurial repository to a Mercurial repository. Can I use it to do nothing on the repos but fix the line endings?

    Read the article

  • Replace a div content with PHP

    - by Zakaria
    hi everybody, yesterday, I posted a question about "Hom to change a DIV id with a php function" and someone found the right answer with a regular expression. The problem is that I wanted to use this answer to aplly the method on other same problems. But, as I'm very bad at regular expressions, I couldn't. So the problem is that I upload some videos with FCKEditor and put the video script in my database and the result is like that: <div id="player959093-parent" style="text-align: center;float: left;"> <div style="border-style: none; height: 160px; width: 270px; overflow: hidden; background-color: rgb(220, 220, 220); background-image: url(http://localhost/fckeditor/editor/plugins/flvPlayer/flvPlayer.gif); background-repeat:no-repeat; background-position:center;"><script src="http://localhost/fckeditor/editor/plugins/flvPlayer/swfobject.js" type="text/javascript"></script> <div id="player959093"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player. <div id="player959093-config" style="display: none;visibility: hidden;width: 0px;height:0px;overflow: hidden;">url=/editeur/images/flash/FOO.flv width=270 height=160 loop=false play=false downloadable=false fullscreen=true displayNavigation=true displayDigits=true align=left dispPlaylist=none playlistThumbs=false</div> </div> <script type="text/javascript"> var s1 = new SWFObject("http://localhost/editeur/javascript/fckeditor/editor/plugins/flvPlayer/mediaplayer.swf","single","270","160","7"); s1.addVariable("width","270"); s1.addVariable("height","160"); s1.addVariable("autostart","false"); s1.addVariable("file","/editeur/images/flash/FOO.flv"); s1.addVariable("repeat","false"); s1.addVariable("image",""); s1.addVariable("showdownload","false"); s1.addVariable("link","/editeur/images/flash/FOO.flv"); s1.addParam("allowfullscreen","true"); s1.addVariable("showdigits","true"); s1.addVariable("shownavigation","true"); s1.addVariable("logo",""); s1.write("player959093"); </script></div> </div> When I echo this content once in my PHP page, It works great. More than once, the videos doesn't appear. Which is obvious because of the unique ID. As you can see, the content has these ids: div id="player959093-parent" div id="player959093" div id="player959093-config s1.write("player959093"); So my question is: Is there a function that can replace the string "player959093" or concatenate it with some other string to resolve the display problem? Thank you very much, Regards.

    Read the article

  • Show/Hide button (text) for Accordion

    - by Kevin
    Have an accordion with a "view" button to open close the accordion panel (using jQuery Tools), but I would like to have dynamic text that says "show/hide" depending on the state... Here is the code for the accordion in asp.NET <div id="accordion"> <% foreach (var eventModel in ViewModel) { %> <% var isNewMonth = eventModel.Date.Month != previousMonth; %> <% if (isNewMonth && previousMonth > 0) { %></table></div><% } %> <% previousMonth = eventModel.Date.Month; %> <% if (isNewMonth) { %> <h2><%= string.Concat(eventModel.Date.ToString("MMMM"), " ", eventModel.Date.Year) %> <span style="float:right;"><a href="#" class="button blue small">View</a></span></h2> <div class="pane" style="display:block"> <table id="listTable" width="100%" cellpadding="3" cellspacing="0" border="0"> <tr align="left" valign="top"><th align="left" valign="top">Date</th><th align="left" valign="top">Event</th><th align="left" valign="top">Event Type</th></tr> <% } %> <tr align="left" valign="top"><td align="left" valign="top"><b><span id="date" style="float:left;"> <%= string.Concat(eventModel.Date.ToString("MMMM"), " ", eventModel.Date.Day, " </span><span id='day' style='float:left'>" + eventModel.Date.DayOfWeek + "</span> ")%></b></td><td align="left" valign="top" ><%= Html.ActionLink(eventModel.Name.Truncate(40), "event", "register", new { id = eventModel.Id }, null)%></td><td align="left" valign="top"><%= string.Concat(" ", eventModel.Sport)%></td></tr> <% } %> <% if (ViewModel.Count > 0) { %></table></div><% } %> </div> Here is the initialization script using jQuery: $(function() { $("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide', initialIndex: 0}); $(".small").click(function() { moveToTop(); }); });

    Read the article

  • jQuery: List expands on page load

    - by Hasanah
    I've been looking for something very simple: How to make a side navigation expand with animation on page load, but all the tutorial websites I usually go to don't seem to have it. The closest I could find is this jQuery sample: http://codeblitz.wordpress.com/2009/04/15/jquery-animated-collapsible-list/ I've managed to strip down the list like so: <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(function(){ $('li') .css('pointer','default') .css('list-style','none'); $('li:has(ul)') .click(function(event){ if (this == event.target) { $(this).css('list-style', (!$(this).children().is(':hidden')) ? 'none' : 'none'); $(this).children().toggle('slow'); } return false; }) .css({cursor:'pointer', 'list-style':'none'}) .children().hide(); $('li:not(:has(ul))').css({cursor:'default', 'list-style':'none'}); }); <body> <fieldset> <legend>Collapsable List Demo</legend> <ul> <li>A - F</li> <li>G - M <ul> <li>George Kent Technology Centre</li> <li>Hampshire Park</li> <li>George Kent Technology Centre</li> <li>Hampshire Park</li> </ul> </li> <li> N - R </li> <li>S - Z</li> </ul> </fieldset> My question is: Is there any way to make this list expand on page load instead of on click? I also don't need it to collapse at all; basically I need only the animating expansion. Thank you for your time and advice. :)

    Read the article

  • How to make emacs properly indent if-then-else construct in elisp

    - by Mad Wombat
    When I indent if-then-else construct in emacs lisp, the else block doesn't indent properly. What I get is: (defun swank-clojure-decygwinify (path) "Convert path from CYGWIN UNIX style to Windows style" (if (swank-clojure-cygwin) (replace-regexp-in-string "\n" "" (shell-command-to-string (concat "cygpath -w " path))) (path))) where else form is not indented at the same level as the then form. Is there an obvious way to fix this?

    Read the article

  • Send/cache multidimensional array to php with jQuery

    - by robertdd
    hy, i have a little, big problem here :) after i upload some images i get a list with all the images. I have some jQuery function for rotate, duplicate, delete, shuffle images! when i select a image and hit delete i send a post to php with the alt="" value of the image,i identify the picture and edit. I want to make a save button, Instead of sending a post every time i rotate a image, better send a post after editing the list of images with an array that contains all data? my php array after upload looks like this: [files] => Array ( [lcxkijgr] => lcxkijgr.jpg [xcewxpfv] => xcewxpfv.jpg [rtiurwxf] => rtiurwxf.jpg [gsbxdsdc] => gsbxdsdc.jpg ) say that I uploaded 4 pictures, firs picture i rotate 90 degrees second i want to duplicate third i rotate 270 degrees and the fourth image i delete i can do all this only with jQuery, but on the server the images are the same, after a refresh the images are the same this is the list with the images: <div class="upimage"> <ul id="upimagesQueue"> <li id="upimagesHPVEJM"> <a href="javascript:jQuery('#upimagesHPVEJM').showlargeimage('HPVEJM')"> <img alt="lcxkijgr" src="uploads/s6id9r9icnp8q9102h8md9kfd7/lcxkijgr.jpg?1272087830477" id="HPVEJM" style="display: block;" > </a> </li> <li id="upimagesSTCSAV"> <a href="javascript:jQuery('#upimagesSTCSAV').showlargeimage('STCSAV')"> <img alt="xcewxpfv" src="uploads/s6id9r9icnp8q9102h8md9kfd7/xcewxpfv.jpg?1272087831360" id="STCSAV" style="display: block;" > </a> </li> <li id="upimagesBFPUEQ"> <a href="javascript:jQuery('#upimagesBFPUEQ').showlargeimage('BFPUEQ')"> <img alt="rtiurwxf" src="uploads/s6id9r9icnp8q9102h8md9kfd7/rtiurwxf.jpg?1272087832162" id="BFPUEQ" style="display: block;" > </a> </li> <li id="upimagesRKXNSV"> <a href="javascript:jQuery('#upimagesRKXNSV').showlargeimage('RKXNSV')"> <img alt="gsbxdsdc" src="uploads/s6id9r9icnp8q9102h8md9kfd7/gsbxdsdc.jpg?1272087832957" id="RKXNSV" style="display: block;"> </a> </li> <ul> </div> is ok if i make one array like this: array{ imgFromLi = array(img1,img2,img3,img4,img5,img6) rotate = array{img1=90, img2=270, img3=90} delete = array{img4,img5,img6} duplicate = array{img2, img3} } how i can send/cache this array?? sorry for my very bad english

    Read the article

  • Callback function in jquery doesn't seem to work......

    - by Pandiya Chendur
    I use the following jquery pagination plugin and i got the error a.parentNode is undefined when i executed it... <script type="text/javascript"> $(document).ready(function() { getRecordspage(1, 5); $(".pager").pagination(17, { callback: pagechange, current_page: '0', items_per_page: '5', num_display_entries : '5', next_text: 'Next', prev_text: 'Prev', num_edge_entries: '1' }); }); function pagechange() { $("#ResultsDiv").empty(); $("#ResultsDiv").css('display', 'none'); getRecordspage($(this).text(), 5); } function getRecordspage(curPage, pagSize) { $.ajax({ type: "POST", url: "Default.aspx/GetRecords", data: "{'currentPage':" + curPage + ",'pagesize':" + pagSize + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(jsonObj) { var strarr = jsonObj.d.split('##'); var jsob = jQuery.parseJSON(strarr[0]); var divs = ''; $.each(jsob.Table, function(i, employee) { divs += '<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>'; }); $("#ResultsDiv").append(divs).show('slow'); $(".resultsdiv:even").addClass("resultseven"); $(".resultsdiv").hover(function() { $(this).addClass("resultshover"); }, function() { $(this).removeClass("resultshover"); }); } }); } </script> and in my page, <div id="ResultsDiv" style="display:none;"> </div> <div id="pager" class="pager"> </div> Any suggestion....

    Read the article

  • AdornerDecorator and tab stop issues

    - by Trev
    Hi, I am using IDataErrorInfo to validate and indicate errors in my text boxes. I am finding I have to tab once for the text box and once for the adornerdecorator. I have an error template: <ControlTemplate x:Key="ErrorTemplate"> <StackPanel KeyboardNavigation.IsTabStop="False" > <Border KeyboardNavigation.IsTabStop="False" BorderBrush="Red" BorderThickness="1" Padding="2" CornerRadius="2"> <AdornedElementPlaceholder KeyboardNavigation.IsTabStop="False" /> </Border> </StackPanel> </ControlTemplate> a textbox template: <Style x:Key="TextBoxInError" TargetType="{x:Type TextBox}"> <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="Margin" Value="0,5,0,5"/> <Setter Property="AllowDrop" Value="true"/> <Setter Property="HorizontalContentAlignment" Value="left"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Grid KeyboardNavigation.IsTabStop="False" > <Border KeyboardNavigation.IsTabStop="False" x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" Padding="2" CornerRadius="2"> <ScrollViewer IsTabStop="False" Margin="0" x:Name="PART_ContentHost" Style="{DynamicResource SimpleScrollViewer}" Background="{TemplateBinding Background}"/> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors), Converter={StaticResource errorConverter}}"/> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="Gray"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> and declare a text box like this: <AdornerDecorator KeyboardNavigation.IsTabStop="False" > <TextBox Margin="5,5,5,3" x:Name="txtName" IsEnabled="{Binding EditMode}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Text="{Binding ApplicationName, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Height="25" MaxLength="50" MaxLines="1" Style="{StaticResource TextBoxInError}"/> </AdornerDecorator> If the adorner is round one text box as above then I tab once to leave the text box and once to leave the 'adornment' (it seems) If I have the adorner around a stackpanel of text boxes then I tab once each for the text boxes then have to go back through all the 'adornments' in turn. When tabbing through the adornments the focus goes on the red border defined in the control template.. any ideas? thanks

    Read the article

< Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >