Click here to Skip to main content
15,887,337 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Got some problem with wpf multibinding Pin
Ian Shlasko13-May-09 8:18
Ian Shlasko13-May-09 8:18 
NewsGet started with Silverlight at XAMLFest Online in June Pin
brucedkyle12-May-09 9:49
brucedkyle12-May-09 9:49 
NewsGet started with WPF with XAMLFest Online in June Pin
brucedkyle12-May-09 9:48
brucedkyle12-May-09 9:48 
GeneralRe: Get started with WPF with XAMLFest Online in June Pin
Mark Salsbery12-May-09 9:49
Mark Salsbery12-May-09 9:49 
GeneralRe: Get started with WPF with XAMLFest Online in June Pin
#realJSOP12-May-09 10:47
mve#realJSOP12-May-09 10:47 
QuestionResource Dictionaries - Confused Pin
#realJSOP12-May-09 6:08
mve#realJSOP12-May-09 6:08 
AnswerRe: Resource Dictionaries - Confused Pin
Mark Salsbery12-May-09 6:51
Mark Salsbery12-May-09 6:51 
GeneralRe: Resource Dictionaries - Confused Pin
#realJSOP12-May-09 8:42
mve#realJSOP12-May-09 8:42 
I've been trying that, and I must be missing some fundamental skill. I have this:


In a separate assembly (a sub-project in the solution)

Styles.xaml
<Style x:Key="StyleUDPBaseButton" TargetType="{x:Type Button}" >
    <Style.Triggers>
        <Trigger Property="IsEnabled" Value="false">
            <Setter Property="Opacity" Value="0.40" />
        </Trigger>
    </Style.Triggers>
</Style>


Buttons.xaml
<Style x:Key="ToolbarButtonNewServiceOrder" TargetType="{x:Type Button}"
                BasedOn="{StaticResource StyleToolbarButtonEx}" >
    <Setter Property="ToolTip" Value="Create a new service order" />
    <Setter Property="Template" >
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type Button}">
                <Image Source="/CometResources;component/Images/GlassServiceOrder64.png" />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>



In the application assembly

Window1.xaml.cs
<Grid Name="gridToolbarObjects" MinHeight="41" MaxHeight="41">
    <Button Name="buttonNewServiceOrder" Style="{DynamicResource ToolbarButtonNewServiceOrder}" />
</Grid>


App.XAML
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/CometResources;component/Styles.xaml" />
            <ResourceDictionary Source="/CometResources;component/Buttons.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>



I'm getting the ever-informative exception that states:

startIndex cannot be larger than length of string.<br />
Parameter name: startIndex


This tells me that it can't find one of the things in my string of derived styles. Actually, it doesn't give any indication of what's really wrong - I had to google it, but I digress.

What am I doing wrong, Obi-Wan? You're my only hope.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: Resource Dictionaries - Confused Pin
Pete O'Hanlon12-May-09 8:51
mvePete O'Hanlon12-May-09 8:51 
GeneralRe: Resource Dictionaries - Confused Pin
#realJSOP12-May-09 8:58
mve#realJSOP12-May-09 8:58 
GeneralRe: Resource Dictionaries - Confused Pin
Pete O'Hanlon12-May-09 9:03
mvePete O'Hanlon12-May-09 9:03 
GeneralRe: Resource Dictionaries - Confused Pin
#realJSOP12-May-09 9:23
mve#realJSOP12-May-09 9:23 
GeneralRe: Resource Dictionaries - Confused Pin
Pete O'Hanlon12-May-09 9:26
mvePete O'Hanlon12-May-09 9:26 
GeneralRe: Resource Dictionaries - Confused Pin
#realJSOP12-May-09 11:01
mve#realJSOP12-May-09 11:01 
GeneralRe: Resource Dictionaries - Confused Pin
Pete O'Hanlon12-May-09 11:10
mvePete O'Hanlon12-May-09 11:10 
GeneralRe: Resource Dictionaries - Confused Pin
Mark Salsbery12-May-09 9:46
Mark Salsbery12-May-09 9:46 
GeneralRe: Resource Dictionaries - Confused Pin
#realJSOP12-May-09 10:36
mve#realJSOP12-May-09 10:36 
GeneralRe: Resource Dictionaries - Confused [modified] Pin
#realJSOP12-May-09 9:02
mve#realJSOP12-May-09 9:02 
QuestionWPF SideBar Pin
GomathiR11-May-09 23:01
GomathiR11-May-09 23:01 
AnswerRe: WPF SideBar Pin
Mark Salsbery12-May-09 7:19
Mark Salsbery12-May-09 7:19 
Questionconvert byte[] to BitmabImage Pin
amer shammout11-May-09 21:56
amer shammout11-May-09 21:56 
AnswerRe: convert byte[] to BitmabImage Pin
KarstenK11-May-09 22:10
mveKarstenK11-May-09 22:10 
GeneralRe: convert byte[] to BitmabImage Pin
califax2k12-May-09 0:43
califax2k12-May-09 0:43 
AnswerRe: convert byte[] to BitmabImage Pin
Pete O'Hanlon12-May-09 1:31
mvePete O'Hanlon12-May-09 1:31 
GeneralRe: convert byte[] to BitmabImage Pin
califax2k12-May-09 2:19
califax2k12-May-09 2:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.