.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Style depending on Windows Theme

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :WPF
Hi,   I want to style a ToolBar differently depending on which theme is used (Aero or Classic) in Windows 7. I have found some examples on the net but all describe how to do this on custom controls. I want to do this on a normal control. Is that possible?

View Complete Post

More Related Resource Links

Setting theme to windows application

Hi I am having Vista Machine & I am developing windows application with VS2008. When i run my application it is showing the current windows theme by default. I want to apply XP classic theme to it. Can you please suggest me how to set my winform as well as control style to XP classic theme. Means after developing my winform application on vista if i run that application on any of the Windows OS it will show me XP theme not the default theme of that operating system. Is there any way for doing the same ? If yes please share it. Thanks, Devendra

How to style a TreeView like the Windows Explorer directory tree?

Hi,   how can I set a Style to a TreeView that displays the selected items with a nice shaded background and highlight it when the mouse is over a item? I tried something like this, but it didn't word (the background of the selected items is still Blue, but not Orange): <TreeView x:Name="TreeView" > <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> <Setter Property="Visibility" Value="{Binding IsVisible, Mode=TwoWay}" /> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Background" Value="Orange" /> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> </TreeView>

Application running in WinXP with a Windows 7 theme

I have an application that runs fine on all OS' except when I run it on Windows XP with a Windows 7 theme running (runs fine with standard XP theme).  I was wondering if anyone has come across this issue before and/or has an idea on the cause and solution to it.  Thanks.   Dion

Detect if Windows theme was changed

Hi,   Is there a way to detect if the Windows theme was changed? Some sort of event.

Windows Security Login popup for 3 times after logged in after changed theme banner


Hi experts,

I do have problem with my SharePoint theme. I have actually create new theme by customized a theme from the default theme in SharePoint. I have replace with new banner and do some changes in the coding site.

After i have applied the theme to my portal, i face problem when i try to logged in using a username from Read Only group, it will appear the windows security login for 3 times before the portal can be access, unfortunately the banner are still not visible. Sometimes, its appear, sometime it didn't. 

However, when i logged in user System Account, i have no problem accessing the page without windows security login appear and the banner are there.

What am i missing, please do let me know. Thank you.

Jquery UI buttons style return back to windows default button



i have placed my 

    <link type="text/css" href="css/smoothness/jquery-ui-1.8.5.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.5.custom.min.js"></script>

<link type="text/css" href="css/smoothness/jquery-ui-1.8.5.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.5.custom.min.js"></script>

under my template.master - master page.

so i make a new page based on my master page.&nb

How to style a group box using Classic theme


Hi, I have a group box control using the Classic style. The left, right and bottom borders all look fine - the top one looks strange. What I would like to do is to change the top border so that it matches the other sides.

How would I go about doing this? I would prefer if you could let me know the steps, rather than the answer so that I can do this next time. Is there some way I can see what style its using for the top and override this? I dont have expression blend installed.

Web Style Windows Forms GUI



I always struggle with developing easy to use Interfaces.  One thing that i've found works for complex applications is a Web Style interface in that you have previous and next buttons and step through each form that way.

I know there is a trick you can use to make a tabcontrol behave like this (mentioned here http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/2494dc38-72a9-4930-8178-c58bb8b9637a), but that has the drawback of leaving all the code in one form and not being neatly organized.

I found this article, which is pretty close to what i want.  http://msdn.microsoft.com/en-us/library/ms951278.aspx

But it is a fairly old article and i haven't been able to find any newer references.  Is that because something better came along that i'm not aware of?  How do you write a complex (multi page) application so that it doesn't open a ton of forms at once, while also organizing the code.  If you could point me in the right direction i would really appreciate it. 



Depending on SQL2005 services on Windows 2003 Cluster



We have an SQL2005 cluster that is running ESRI ArcSDE. ESRI suggests that it depends on SQL Agent and this is how we have the resource dependency setup. We had a situation that we had to take SQL Agent offline and then abck online and this caused ArcSDE to stop as well. ArcSDE needs SQL to be active rather than SQL Agent and there could be other occasions that SQL Agent is in trouble and needs to be stopped/started as is used for our database backups. Is there a better dependency we could use or have we setup the dependency in the clustered services incorrectly?




Applying a Windows .theme file programatically


After searching the internet high and low, I still can't find a documented method of changing a windows theme silently.  There are ways to apply themes to applications, and ways to apply msstyles without prompting the user, but I have run into considerable difficulty finding a supported way to apply a microsoft theme file.  Doesnt seem to matter if it is XP, Vista, or Win7 - they all cause a .cpl applet to appear and remain on the desktop.  Sendkeys is never a good solution, and I know I can close the window by the handle ID, but it still appears for a second and that's unacceptable.  Has anyone solved this problem?  Is there any way to prevent the control panel personalization (Win7) window from opening?

Thanks in advance. . .


WebGrid: column definition - Set 'style:' parameters depending on value


I have a list of objects (List<myObject>) which I pass to a webGrid. I would like to set cells for a column of the table to a specific value depending the object's 'StatusColor' property. Something like

List<myObject> myObjectList = 
WebGrid webGrid = new WebGrid(source: myObjectList, ..);
columns: webGrid.Columns
webGrid.Column("Status", "Status", format: @<text>@item.StatusName</text>, style:



But for some reason, I get "cannot convert from 'lambda expression' to 'string'". When I remove the @<text> suround the item property, I get "the name '@item' does not exists in the current context"

For the 'format:' part, it works fine.

Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

Serving Silverlight Apps from Windows Mobile

Even if mobile dev is not my every day work, thanks to the .Net Compact Framework, it's still .Net programming.

Here is the scenario:

You come back home, you have a windows mobile phone wifi capable and you want to quickly get access to your phone pictures from your home network.
You just activate the Wifi, run my app and then browse to the provided link from any computer on the network.

Getting Started with Windows SharePoint Services

Of all of the capabilities of SharePoint, I thought I would start with the most basic installation - as a corporate intranet. It is likely that we will need to discuss some of the elements of SharePoint as we go along, so this also gives us the opportunity to review these elements for future reference.

Before going into too much detail, I would like to point out that you can try the core SharePoint framework (known as Windows SharePoint Services or WSS) for free. On Microsoft's Web site you can download a trial version of Virtual PC 2004 (VPC). Using VPC, you can install the Windows 2003 Evaluation Kit and the WSS add-on. This combination will give you 45 days to evaluate the setup.

Building a Searchable Phone Directory with Windows SharePoint Services

I want to continue to build out the intranet site we've started in our previous articles. A standard item in every intranet is a staff/employee list. Most companies implementing Windows SharePoint Services (WSS) are large enough to have a database that contains all employees. We will use the aggregation features of SharePoint to include data from this database into our intranet.

ASP.NET repeater control - databind with style

even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I managed to write code to hide all other rows and only show the current one - the row being edited). With a nice looking EditTemplate it looked indeed very slick but it really turned into giant and hard to manage code behind files.

Getting Started with Windows Communication Foundation

Windows Communication Foundation (WCF) provides a unified framework for rapidly building service-oriented applications that makes it easy to build and consume secure, reliable, and transacted Web services. It unifies the capabilities in ASMX, WSE, Remoting, COM+, and MSMQ; therefore developers need to learn only one programming model.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend