Click here to Skip to main content
15,881,938 members
Everything / Style

Style

style

Great Reads

by Anurag_Gahrat
In this guide, learn about CSS Glassmorphism, its history, its characteristics, and how to create it, along with examples.
by wpfdev
This blog post is re-posted from www.eriklieben.com. Looking at the file tab of Word 2010, I’ve wondered if a WPF tab control could be transformed to this layout. At first, this felt like something that could never be done, without doing a lot of magic or building it from scratch...
by Joshi, Rushikesh
You learn how to create your own Code Snippets and publish them to your Team to use them.
by ASP.NET Community
Cascading Style Sheets (CSS) is one of the core technologies in the AJAX architecture apart from XML, DOM, JSON and so forth. Here are some links

Latest Articles

by Anurag_Gahrat
In this guide, learn about CSS Glassmorphism, its history, its characteristics, and how to create it, along with examples.
by ToughDev
How to allow only numeric input in TextBox
by Ahmed Bouchefra
How to remove comments from JSON using Python
by Rudolf Jan
Explains how to set up and use colours, fonts and dimensions for re-usability in WPF applications

All Articles

Sort by Score

Style 

28 Jun 2023 by Anurag_Gahrat
In this guide, learn about CSS Glassmorphism, its history, its characteristics, and how to create it, along with examples.
7 Aug 2013 by Punamchand Dhuppad
You can Apply this style to your "Play" button..
24 Jan 2012 by Sergey Alexandrovich Kryukov
First, about FxCop. I think it is a very useful if you take is critically. You certainly need to adjust the rule sets and customize some rule to get a reasonable check. In my opinion, some rules cannot be used because they are simply idiotic. I give some example with argument in my past...
22 Feb 2011 by wpfdev
This blog post is re-posted from www.eriklieben.com. Looking at the file tab of Word 2010, I’ve wondered if a WPF tab control could be transformed to this layout. At first, this felt like something that could never be done, without doing a lot of magic or building it from scratch...
19 Apr 2011 by Joshi, Rushikesh
You learn how to create your own Code Snippets and publish them to your Team to use them.
21 Jul 2011 by Keith Barrow
WPF requires quite a shift of thinking from winforms, I prefer it. I suggest you look up the M-V-VM pattern for WPF. The first thing you need to do is separate yor View model, it makes the code much cleaner and separates concerns much better. Here is the ViewModel base class: public...
21 Jul 2011 by 2irfanshaikh
I think you should do it in XAML it self.When we change the CurrentPage simply Notify itand in xaml, use Multiple Trigger and Condition check the button content is same as CurrentPage then change the background.Put the Multiple Trigger Style
11 Oct 2013 by ASP.NET Community
Cascading Style Sheets (CSS) is one of the core technologies in the AJAX architecture apart from XML, DOM, JSON and so forth. Here are some links
21 Jul 2011 by Pritesh Aryan
I have following Scenario:I have used one ItemsControl.Which generates Button as per ItemsSource Given to it?Now,when i am hitting nextbutton.The ItemsSource of ItemsControl(pageControl) Changes.[have a look mainwindow.xaml]and also have to chagne the background of button which...
21 Jun 2012 by Sandeep Mewara
Here, have a look at these and start:CSS Style Sheet for Ajax TabContainer Control in ASP.NET 2.0[^]How to: styling the ASP.NET AJAX TabContainer control[^]
22 Oct 2013 by bjdestiny
hi, try that in give z-index:-1 in background layer div and give z-index:9 to upper layer div. i think it will solve your this problem.
13 Dec 2013 by thatraja
Searched Google & CP?Mac OS X Theme for Windows Forms[^]Customize things based on your requirement.
26 May 2014 by Tkach Aleksey
WPF Gmail-style emails input control using C#, with email validation
4 Sep 2020 by Ahmed Bouchefra
How to remove comments from JSON using Python
30 Dec 2010 by William Winner
What you would want to do is hook the textbox's TextChanged event. Because you've databound that textbox, the listbox has no knowledge of the textbox, so that's where you would have to start.So, in that event, you would just draw a box around the textbox with the color that is in the...
18 Apr 2011 by #realJSOP
Microsoft makes the default styles available in a download, and are based on the selected windows theme.http://code.msdn.microsoft.com/wpfsamples#themes[^]Or you can find a 3rd party tool like Style Snooper[^].Google reveals all.
13 Jun 2011 by MGScott
I found the solution. I needed to move the VisualStateManager section completely OUT of the BulletDirectorator section. That solved everything.BTW, the link above is incorrect. The template comes from the ControlTemplateExamples example provided by Microsoft.Just thought I'd pass...
20 Jul 2011 by Wjousts
You can't change the background because your control template doesn't respect the background property. Instead of setting Background = "Transparent" in your template, you need to use TemplateBinding to bind to the actual Background property of the button.*Edit*Ah, good eye - I missed the...
20 Feb 2012 by Saeid.Babaei86
How to register a stylesheet file at run time
1 Jun 2012 by SASS_Shooter
What I ended up doing was (really) quite simple. It ended up being more of understanding syntax more than anything else.For my ListView I ended up having my definition implemented with specific brushes:
10 Jun 2012 by Stephen Hewison
As Pankaj suggests you can stop the drop action using:ondrop="return false;"As you've already suggested you can stop the paste action using:onpaste="return false;"You can also stop the user selecting text from any part of your website by using the following on the relevant...
20 Jul 2012 by Christian Graus
you just make your buttons show an image instead of text. They have properties for that.
22 Aug 2012 by Christian Graus
You can't do this, but you can create one style and then use it for other controls.If you have the following Style You can target all Buttons for instance
22 Aug 2012 by barneyman
do you mean Using Windows XP Styles in your MFC/WIN32 Applications[^]?
1 Aug 2013 by Dev Leader
Ever since I can remember, I've always been told to keep fields private.
21 Aug 2013 by bowlturner
On my TabControl I have a Content Template that implements a Transition template. What I would like to do is have one template be used when the tab selected is 'higher' (to the right) and a different one when the tab is lower (to the left) of the current selected tab. This is to make it look...
22 Aug 2013 by Clifford Nelson
It might be easier to use a ValueConverter. At least it is easier to bebug. For information on using IValueConverter, try this article: Data-Binding-Using-IValueConverter-in-SilverlightData Binding Using IValueConverter in Silverlight[^]
19 Mar 2015 by Sergey Alexandrovich Kryukov
UI elements can reference style in XAML using the Style attribute, which value can use StaticResource. This is the way to reference the style defined separately and have different styles for the same type of UI element.Please start here:...
24 Dec 2015 by ZurdoDev
As mentioned in the comments, just use your browser to find the CSS that is being applied and then do the same thing.
25 Dec 2015 by Krunal Rohit
Well, that blue border is the outline of your textbox. If you want to get rid of it, do something like- .textbox:focus{ /* your other CSS rules */ outline: 0;}Hope it helps.-KR
29 May 2017 by Bryian Tan
You can try to set the ViewStateMode="Disabled" on the ListView control. That case on button click, post back happen, the original color will be restored using the default color instead of the color saved in ViewState.
12 May 2019 by OriginalGriff
Simple! You contact the author: NuGet Gallery | MaterialDesign.dll 1.0.0[^] and ask him for source code and permission - it is copyright to him, after all.
1 Jul 2021 by Chris Copeland
Richard Deeming is correct, you've used the DynamicResource to allocate the styles to the elements, but the styles themselves are using StaticResource to allocate the colours. You need to amend the styles themselves to use dynamic resources: ...
14 Oct 2015 by Beavis Killer
Salesforce is not a good CRM platform. In case you have to use it, here is how to highlight fields based on their contents.
30 Dec 2010 by Adriaan
Hi there, thanks for the answers. What if i use a storyboard for the border color change and play the story board onTextChanged? Is this a bad way of doing it?
30 Dec 2010 by Adriaan
Hi there, thanks for the answers. What if i use a storyboard for the border color change and play the story board onTextChanged? Is this a bad way of doing it?Hi there, i was wondering if someone can assist with tips on the following:1. I added a listbox with five listbox items (Name...
17 Mar 2011 by pufo
How can I customize facebook "Activity Feed" plugin using a css stylesheetI google for hours and I couldnt find any way to add css style to a facebook's IFrame or tag. Please help me.thank you
18 Apr 2011 by cesarin
Anybody knows a good software that describes (or shows) all the XAML code of the common WPF controls?I'm using VS2010 Express Edition and I want to change the position of the scrollbar (and the scrollbar buttons) at the bottom of a listview control instead of the right side. I really like to...
10 May 2011 by #realJSOP
I'm sorry, but that code resembles nothing I've seen that would compile, and has nothing to to with SQL, so that makes your tags wrong, too.
24 May 2011 by Colin Eberhardt
How to re-template the Silverlight ProgressBar control to render a circular progress indicator
8 Jun 2011 by ubaidh sayed
Hello Everyone,I am using Dot Net Nuke community version to build my web site. I am very new to programming and DNN.When i add a new page the menu is displayed horizontal like HOME | CONTACT US | ABOUT US | CAREERSI want to display it as a vertical menu likeHOME CONTACT USABOUT...
8 Jun 2011 by Ramalinga Koushik
If you are using the DotNetNuke menu, set the "display" attribute to "vertical." You will do this in the skin's manifest file if you are using HTM skins, or you can do it in the menu control if you are using ascx skins.
14 Jun 2011 by Ed Nutting
I have solved this one myself recently but it depends very much on your situation. I will give you the following pointers:1) No JavaScript is requiredEdit: Having had a look at demo, the fading requires javascript, the basic concept of a vertical menu that displays items below it does not...
17 Jun 2011 by tomgeo19
i've used a button inside a datatemplate.. i'm trying to access it by using TargetName in setter for style... how do u access the button??please help!! my "executioncontrol" contains a button that i'm trying to access..
16 Jun 2011 by JV9999
Woops my bad, I thought your code was ASP.NET...Have a look here for WPF specific ways:Ways to find controls in WPF[^]Finding controls in WPF[^]Don't know of a way to do this in XAML, you might be able to do it with binding.
28 Jul 2011 by EriBeh
Hello,I want to style a vertical scrollbar for my textbox.I am NOT allowed to add/use a style that is automatically used for all textboxes, or scrollviewers, because I am not allowed to override anything common.So I need a style with a key/name I can use for each textbox (or...
19 Sep 2011 by Vijay Pate
I am working on Project with AfxMessaeBox and MB_OKCANCEL and I need to utilize OK to move to next page and CANCEL to terminate the Application any idea?Code I wrote so far to accomplish is as follow:COleDateTime timeStart;COleDateTimeSpan timePassed; int daysLeft = 0;timeStart =...
20 Sep 2011 by André Kraak
The AfxMessageBox[^] return value can be used to determine which button was pressed by the user. When using the style MB_OKCANCEL the function returns IDOK when the OK button is pressed and IDCANCEL when the cancel button is used.if( AfxMessageBox( strMessage, MB_OKCANCEL) == IDCANCEL...
16 Dec 2011 by santhosh-padamatinti
You can try likepublic string returnTest(){StringBuilder S= new StringBuilder();s="Show"return s.toString()}
24 Jan 2012 by wonder-FOOL
Hello all,I have been reading information and the usage of FxCop and StyleCop for a day or so. But I also would like to have your opinions? You useful and important to use these two programs. I will be glas if you can share your thoughts with me.Thanks
24 Feb 2012 by Arunprasath Natarajan
Dear Friends,I have used Gradient effect in a page.But its not working in Google Chrome and Mozilla Firefox.Kindly suggest.#grad1{filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#003366', startColorstr='#55aaee', gradientType='2');}
24 Feb 2012 by Arunprasath Natarajan
#gradftb {color: #55aaee;height: 23px;padding: 0px;/* For WebKit (Safari, Google Chrome etc) */background: -webkit-gradient(linear, left top, left bottom, from(#55aaee), to(#003366));/* For Mozilla/Gecko (Firefox etc) */background: -moz-linear-gradient(top, #55aaee, #003366);/* For...
30 Mar 2012 by siva varri
Could you please help me, I gave input as DispalyName (eg:(GMT-06:00) Central America) then i want to get current date and time .
30 Mar 2012 by siva varri
This is works on .net 4.0, In TimeZoneInfo class doesn't have a FindSytemTimeZone method in metro style apps. So how to do this in metro style apps...string ZoneId = "Central America";DateTime localtime = DateTime.Now;TimeZoneInfo timeZoneInfo =...
4 Apr 2012 by cpquest
Hi all,I am in need of dropbutton some thing like this as below. i tried with ToggleButton but its not as like this so any one can share you template that you have done before as like this. (this can be found in Windows 7 explorer ). Image Link
8 Apr 2012 by cpquest
Hi,i found the soution my self. please follow the below link.http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/ab48d819-a8c4-45a7-acb3-b82ab94b19e6[^]
16 May 2012 by Arunprasath Natarajan
Dear Friends,I have given the width to table, but when continue text occurs, the respective column takes the other columns width too. Kindly suggest if there is possible is break the line if it reaches the mentioned column width.Regards,AP
31 May 2012 by db7uk
I think you need to create a transparent listviewItem like this: Once this is styled you wont have (shouldnt have) a highlight color. Next you can simply style the listview like so:SelectedItem="{Binding...
1 Jun 2012 by Adam David Hill
The XAML looks fine. Have you installed the Silverlight Developer Runtime?
27 Feb 2021 by Arunprasath Natarajan
Dear Friends,I have placed a textarea in page.I have given onpaste=return false, So I not allowing the user to copy the content.But when drag and drop the content in the text area it allows the action.Kindly suggest what I can do for this issue.Regards,AP
9 Jun 2012 by Pankaj Nikam
You can use the following property to disable the drops on the textbox.ondrop="return false;"
26 Jun 2012 by Arunprasath Natarajan
Dear Friends,I have seen in many web-sites that, to Share particular infomation in fb, twitter etc.When user click, it will be posted in their wall.I want to add the same in my website also.Can any one give your suggestion and guide me on this.Do we need to get any approval or is it...
26 Jun 2012 by Tim Corey
You will need to use the APIs provided by Facebook and Twitter respectively. You will also need to sign up as a developer with those sites. Here is more information on how to do this with...
26 Jun 2012 by Tim Corey
If you want to have an Accordion effect using CSS only, then this article is your best bet:http://www.cssnewbie.com/css-only-accordion/[^]
20 Jul 2012 by Rubinder
For my C# project i want to add some stylish buttons ...........Plz tell me how can i add them ......Thnks :)
20 Jul 2012 by Mehdi Gholam
"Stylish" is relative and subjective, see the following section in CodeProject : http://www.codeproject.com/KB/buttons/[^]
21 Jul 2012 by Kenneth Haugland
Sorry, I thionk I got in now:http://stackoverflow.com/questions/1786031/applying-a-fontfamily-to-all-controls-in-silverlight-4-beta[^]And this code would make them equal: ...
22 Jul 2012 by Farhan Ghumra
use callisto [^] controls
24 Jul 2012 by Christian Amado
You must see this post How to Find Date and Time by Time Zone using c#It's a very nice implementation! Works in all type of .NET projects.Hope it helps.
26 Jul 2012 by NothingToLoose
Write following in style tag of aspx file.ajax__myTab .ajax__tab_header { font-family: Arial, Helvetica, sans-serif; font-size: 12px;font-weight: bold;color:#000;border-left:solid 1px #666666; border-bottom:thin 1px #666666 } .ajax__myTab .ajax__tab_outer {...
1 Aug 2012 by Arunprasath Natarajan
Dear Friends,I have used the gradient effect in my page.But my text content is not displayed in black color (#000000) what I have mentioned.It is something like white.Kindly guide me on this. Below is the coding what I use. .My_Class{margin: 1px; padding: 10px; color:...
1 Aug 2012 by _Amy
Hi,backgroun...
9 Aug 2012 by Arunprasath Natarajan
Dear Friends,I have to display few set of contents in div tag using flip style.I have refered the few external website but i can file only demo.No step by step process or eg. I can get.Kindly suggest me any link or simple flip style.
22 Aug 2012 by NeonMika
I would like to do something like this: Is this possible? It doesn't work this way...I know I could write for every control something like the following:
22 Aug 2012 by Sky_Monster
hello friendsi just done with my team in the work converting our ERP system from MFC c++ to visual studio 2008.netbut we still stuck with the old bad style and we dont have enough experince in how to change that old style to new oneand if any one could give me a good and ready style i will...
23 Aug 2012 by NeonMika
Hey out there, my next WPF question :PI have a "basic style" in my app.xaml, and the following style makes trouble:
20 Oct 2012 by Member 9346729
Figured it out. Had to do the binding to RelativeSource.Self.. Add two triggers for true and false. Ignore the converter.. I needed one for the image I was using. ...
28 Oct 2012 by Ubaid ur Rahman IT
Dear Friends, Am facing problem with Menu.I have created a website in asp.net c# and used Css , style sheets.my requirement is, when i select particular page from menu..MOUSE OVER Should stay on that particular page. so that user can understand that he is on this page.This is my...
14 Dec 2012 by mornej
From what I understand you have to be running windows 8 in order to build metro apps.The easiest way will be to run windows 8 in a virtual machine with visual studio 2012 installed.From there Visual Studio should have a template that you can work from.
16 Dec 2012 by kk2014
hi all,i want design consistency in my whole site. means i want my site in center. something like when we press control key + scroll down in mouse then whole design will comes in center of browser.i hope that you can understand what i want to say.thanks,kk
16 Dec 2012 by sisir patro
Hi. kkakadita,I understood the problem that you mentioned here.Its only due to the styles that we apply in designing the page. i.e If we design a page using a fixed width (in pixels) then that element or the page controls will follow the fixed width property. If you design the page with...
13 Jan 2013 by Ranjith Reddy CSE
How to display Rounded Corners in Internet Explorer.=================================================i have created a asp.net application. but my problem is its unable to display rounded corners for button in Internet Explorer.it is displaying in Chrome but not in IE.Please help.
13 Jan 2013 by Sandeep Mewara
Here, following will help: CSS Rounded Corners In All Browsers (With No Images)[^]
16 Jan 2013 by Elan.Cao
There's a datagrid in my from,and I ues a DataTrigger to set the DataGridCell's foreground color to ensure that it looks clear,just like this:
16 Jan 2013 by Thomas Duwe
Hi,I think you can achieve this using a MultiDataTrigger for the IsSelected property(in addition to the DataTrigger for the State property) like so: ...
5 Feb 2013 by Gianluca Palmieri
Hi, I have a custom window:public class MyWindow : Window{ ...}and a separate style for this window:
5 Feb 2013 by Jason Gleim
Your code post doesn't show enough detail to know what exactly you are doing and how but I can give you some general directions.If you are creating a true custom control, then there is a lot of plumbing that is in the class which you skipped over in your post but which is key to making it...
11 Mar 2013 by gouravkaila
Its Because of xhtmlconformance mode as legacy in web.config.
2 Apr 2013 by Janani Muthaiyan
I am having the gridview as follows.. I need to change the row color based on the color value in db.//ASP.NET//C#.NET protected void GridView1_RowDataBound(object sender,...
2 Apr 2013 by Maciej Los
Use GridViewRowEventArgs e passed into GridView1_RowDataBound procedure:if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.BackColor = Color.FromName(StringValueReturnedByQuery); }But before... have a look at below SP:CREATE proc [dbo].[gridcolor] ...
4 Apr 2013 by Member 8681301
Can anyone tell me why the DataTriggers in the following XAML code are setting the background color of the entire row of the DataGrid and not the individual cell? I have the TargetType set to "DataGridCell".
4 Apr 2013 by Clifford Nelson
I would suspect that every cell in the row probably is looking at the same property aciton. Therefore when the value of aciton changes, every cell in the row gets the same color.
24 Jun 2013 by Jashobanta
Hi,I am trying to create a style that is to be applied to a Bing Map PushPin control. But I need to set the location of the Pushpin from the page where the control is implemented (like templateBinding) and not in the style. The control template in the style will be applied on an infobox...
22 Jul 2013 by stantheman17
Hi all,I am new to the forum but hoping you can help me out here.How could I reproduce the effect of scrolling with sticky headers like in this example?I would like a nice sticky header that pushes the current one up in place of the new one. I'm looking to do it with WPF (XAML -...
1 Aug 2013 by kiranrahir
I have grid and i want to color foreground red if Qty
2 Aug 2013 by Irina Pykhova
you set binding in the style setter for column. But according your question, you need it for individual cell, not for column. What is your _Left_Part_DE? If it has property like CellStyle, try to use it instead of Style (in such case Style target type should be changed as well).Binding...
19 Aug 2013 by Naz_Firdouse
To apply your own styling, remove the BasedOn="{StaticResource {dxgt:GridRowThemeKey ResourceKey=RowStyle}}and apply your own setters like