Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kb boxer

@kb boxer
About
Posts
15
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • IsMouseOver not sensed (Triggers in a Control Template) ???
    K kb boxer

    I have defined a control template for a button, which would change the bacckgound color of the button when the mouse is over it. But sometimes the control does not sense the mouse is over it and the background color does not change. However, during such times, when the mouse is slowly moved over the content, the mouse is sensed and backgound changes. Please help me find what is wrong. (Try moving the mouse over the button either a bit fast or a bit slow).

    <Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    x:Name="Window"
    Title="MainWindow"
    Width="640" Height="480">
    <Page.Resources> <Style x:Key="ButtonFocusVisual">
    <Setter Property="Control.Template">
    <Setter.Value>
    <ControlTemplate>
    <Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="2" SnapsToDevicePixels="true"/>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
    <GradientStop Color="#F3F3F3" Offset="0"/>
    <GradientStop Color="#EBEBEB" Offset="0.5"/>
    <GradientStop Color="#DDDDDD" Offset="0.5"/>
    <GradientStop Color="#CDCDCD" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
    <Style x:Key="EllipseButton" TargetType="{x:Type Button}">
    <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="Template">
    <Setter.Value>

    WCF and WF question dotnet wpf com help

  • Control Property Updates (Triggers) ??? [modified]
    K kb boxer

    Hi I have three buttons (in a stack panel); dont mind the names of the button.

    <Button Name="retryBtn" Content="Retry" MinWidth="100" MinHeight="50" Margin="5, 5, 5, 5" />
    <Button Name="cancelBtn" Content="Cancel" MinWidth="100" MinHeight="50" Margin="5, 5, 5, 5"/>
    <Button Name="ignoreBtn" Content="Ignore" MinWidth="100" MinHeight="50" Margin="5, 5, 5, 5" />

    1. Now I need to trigger property changes as follows when the ignore button is pressed.

    <Button Name="ignoreBtn" Content="Ignore" MinWidth="100" MinHeight="50" Margin="5, 5, 5, 5">
    <Button.Style>
    <Style TargetType="{x:Type Button}">
    <Style.Triggers>
    <Trigger Property="IsPressed" Value="true">
    <Setter Property="Content" Value="Booooooo!!!!" />
    <Setter Property="Foreground" Value="Red" />
    <Setter Property="HorizontalAlignment" Value="Right" />
    </Trigger>
    </Style.Triggers>
    </Style>
    </Button.Style>
    </Button>

    But only the Foreground property change happen and other property changes do not happen. Why? 2. In case 1, the property of the same button are being updated. How to update the property of another button (or Control) when the IsPressed of ignoreBtn changes to true? Using TargetName attribute on the Setter node gives compilation error. Any help appreciated. Regards Vivek Ragunathan

    A Developer's Experience

    Programming is an art. Code is a poem.

    modified on Wednesday, May 19, 2010 8:52 AM

    WCF and WF help database com data-structures tutorial

  • Preventing multiple instances of COM singleton???
    K kb boxer

    Thanks. That is one way to solve the problem. But what I am really looking for is a way that COM infrastructure would take care of. What this means is I should not report error to the user, instead return the reference of the already created COM object. If the COM server is launched as service and all users connect to it using CoCreateInstance, they get the same reference. But when the COM server is launched using the current user account, things are screwed up as a second instance is created. Instead COM should not create the second instance, instead return the reference of the COM object hosted in the service. Thanks

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    ATL / WTL / STL question com sysadmin

  • Preventing multiple instances of COM singleton???
    K kb boxer

    Hi I am building a out of proc COM Server, which would be registered as service. I want my server to be a singleton, so I have declared DELCARE_CLASSFACTORY_SINGLETON in my coclass. My server startup code RegisterClassObjects with REGCLS_MULTIPLEUSE flag. However, it is possible to launch 2 instances of my server process; one that is launched by the service manager and running under the system account; the second one can be launched from the current user's account. How do I prevent mutiple instances of my COM server, irrespective of the user accounts? Thanks in advance Vivek Ragunathan

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    ATL / WTL / STL question com sysadmin

  • Limit size of text file (LIFO)
    K kb boxer

    I guess you have to resort to using memory mapped files. And when an hour passes, you would have to move up the records except the first one (LIFO). Hope that helps.

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    C# csharp question

  • invoking events of a control under another control
    K kb boxer

    Perhaps you could explain again in an other way. It is not clear if you are using 2 controls (one top of other) or are you using 2 images?

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    C# help

  • How to inject code into .net assemblies ?
    K kb boxer

    Cool down, Use your energy to solve the problem. Try Mono Cecil. You can edit IL, add\remove functionality and do more.

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    C# csharp tools tutorial question

  • How to inject code into .net assemblies ?
    K kb boxer

    What is your intent? I am asking you since you have went to extremes like Reflexil.

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    C# csharp tools tutorial question

  • A better way
    K kb boxer

    If you are using C# 3.X and above, you can use the extension methods of IEnumerable; the one you are looking for is Intersect. So ftList.Intersect(CountyList) gives you a collection of all elements of ftList that are present in CountyList. Hope that helps!

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    C# question

  • What's the best collection
    K kb boxer

    There is library available from Wintellect that has unordered set, the one you are looking for. You might try it if you wish.

    http://vivekragunathan.spaces.live.com

    Programming is an art. Code is a poem

    C# database help question

  • IUnknown -> object => null ???
    K kb boxer

    There are various components beside the main component and the main component is responsible for providing access to the other components. Hence a GetInterface.

    Programming is an art, Code is a poem !!!

    C# com csharp question

  • IUnknown -> object => null ???
    K kb boxer

    Hi I am having a COM interface method like this:- interface IMain : IUknown { HRESULT GetInterface([in]IID riid, [out, iid_is("riid")]IUnknown **ppInterface); } and importing the idl/tlb to metadata; the above method is translated as follows:- [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] void GetInterface([In] Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppInterface); When i call this from the .NET client like this:- Guid someItfGUID = "6BD5A170-D0DC-4b59-8D86-2651C46CB6CC"; object itfObject = null; iMain.GetInterfacesomeItfGUID, out itfObject); IController ctrlr = itfObject as IController; I see that the itfObject is null even after the call to GetInterface but does not fail on the COM side. Let me know if you get any idea why itfObject is null [why the IUnknown/IController is not transported across]. Thanks Vivek Ragunathan

    Programming is an art, Code is a poem !!!

    C# com csharp question

  • Wrong article count
    K kb boxer

    Thanks for the response.

    Programming is an art, Code is a poem !!!

    Site Bugs / Suggestions help question

  • Wrong article count
    K kb boxer

    Hi Under the user information, my article count shows 3 but i have posted only 2. When posting the second article, it threw up some error and the article submission failed. Then i tried again to submit the same, it went well. But the article count shows 3 instead of 2. Who should I report this to fix ? Thanks Vivek Ragunathan

    Programming is an art, Code is a poem !!!

    Site Bugs / Suggestions help question

  • How to track urls
    K kb boxer

    Hi What is the basic idea to track the url requests. My intention is trap all url request i post using IE or mozilla and say save that to a file. Can any one help me in this regard. Regards Vivek Ragunathan

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups