how reinstate click eventuality mouseover silverlight 2.0 combobox?
i have combo box silverlight 2.0 i wish open user mouses over toggle symbol following tie rodent away. default function click.
here impression formula (sorry long):
<style x:key="helpcomboboxstyle" targettype="combobox">
<setter property="padding" value="0,0,0,0"/>
<setter property="background" value="#ff1f3b53"/>
<setter property="horizontalcontentalignment" value="left"/>
<setter property="borderthickness" value="1"/>
<setter property="tabnavigation" value="once"/>
<setter property="borderbrush" value="#104f9b"/>
<setter property="template">
<setter.value>
<controltemplate targettype="combobox">
<grid>
<grid.resources>
<style targettype="togglebutton" x:name="combotogglestyle">
<setter property="borderbrush" value="#104f9b"/>
<setter property="borderthickness" value="1"/>
<setter property="padding" value="3"/>
<setter property="template">
<setter.value>
<controltemplate targettype="togglebutton">
<grid>
<vsm:visualstatemanager.visualstategroups>
<vsm:visualstategroup x:name="commonstates">
<vsm:visualstategroup.transitions>
<vsm:visualtransition generatedduration="00:00:00.1" to="mouseover"/>
<vsm:visualtransition generatedduration="00:00:00.1" to="pressed"/>
</vsm:visualstategroup.transitions>
<vsm:visualstate x:name="normal"/>
<vsm:visualstate x:name="mouseover">
<storyboard>
<objectanimationusingkeyframes duration="00:00:00" storyboard.targetname="popupborder" storyboard.targetproperty="(uielement.visibility)">
<discreteobjectkeyframe keytime="00:00:00">
<discreteobjectkeyframe.value>
<visibility>visible</visibility>
</discreteobjectkeyframe.value>
</discreteobjectkeyframe>
</objectanimationusingkeyframes>
</storyboard>
</vsm:visualstate>
<vsm:visualstate x:name="pressed">
<storyboard>
<doubleanimationusingkeyframes storyboard.targetname="backgroundoverlay2" storyboard.targetproperty="opacity">
<splinedoublekeyframe keytime="0" value="1"/>
</doubleanimationusingkeyframes>
<doubleanimationusingkeyframes storyboard.targetname="highlight" storyboard.targetproperty="(uielement.opacity)">
<splinedoublekeyframe keytime="0" value="1"/>
</doubleanimationusingkeyframes>
<coloranimationusingkeyframes storyboard.targetname="backgroundgradient" storyboard.targetproperty="(shape.fill).(gradientbrush.gradientstops)[1].(gradientstop.color)">
<splinecolorkeyframe keytime="0" value="#e5ffffff"/>
</coloranimationusingkeyframes>
<coloranimationusingkeyframes storyboard.targetname="backgroundgradient" storyboard.targetproperty="(shape.fill).(gradientbrush.gradientstops)[2].(gradientstop.color)">
<splinecolorkeyframe keytime="0" value="#bcffffff"/>
</coloranimationusingkeyframes>
<coloranimationusingkeyframes storyboard.targetname="backgroundgradient" storyboard.targetproperty="(shape.fill).(gradientbrush.gradientstops)[3].(gradientstop.color)">
<splinecolorkeyframe keytime="0" value="#6bffffff"/>
</coloranimationusingkeyframes>
<coloranimationusingkeyframes storyboard.targetname="backgroundgradient" storyboard.targetproperty="(shape.fill).(gradientbrush.gradientstops)[0].(gradientstop.color)">
<splinecolorkeyframe keytime="0" value="#f2ffffff"/>
</coloranimationusingkeyframes>
</storyboard>
</vsm:visualstate>
<vsm:visualstate x:name="disabled">
<storyboard>
<doubleanimationusingkeyframes storyboard.targetname="disabledvisualelement" storyboard.targetproperty="(uielement.opacity)">
<splinedoublekeyframe keytime="0" value="1"/>
</doubleanimationusingkeyframes>
</storyboard>
</vsm:visualstate>
</vsm:visualstategroup>
<vsm:visualstategroup x:name="checkstates"/>
<vsm:visualstategroup x:name="focusstates"/>
</vsm:visualstatemanager.visualstategroups>
<rectangle x:name="background" fill="{templatebinding background}" stroke="{templatebinding borderbrush}" strokethickness="{templatebinding borderthickness}" />
<rectangle x:name="backgroundoverlay" opacity="0" fill="#ff448dca" stroke="#00000000" strokethickness="{templatebinding borderthickness}" />
<rectangle x:name="backgroundoverlay2" opacity="0" fill="#ff448dca" stroke="#00000000" strokethickness="{templatebinding borderthickness}" />
<rectangle margin="{templatebinding borderthickness}" x:name="backgroundgradient" stroke="#ffffffff" strokethickness="2" >
<rectangle.fill>
<lineargradientbrush endpoint=".7,1" startpoint=".7,0">
<gradientstop color="#ffffffff" offset="0"/>
<gradientstop color="#f9ffffff" offset="0.375"/>
<gradientstop color="#e5ffffff" offset="0.625"/>
<gradientstop color="#c6ffffff" offset="1"/>
</lineargradientbrush>
</rectangle.fill>
</rectangle>
<rectangle x:name="backgroundoverlay3" opacity="0" fill="#ff448dca" stroke="#00000000" strokethickness="{templatebinding borderthickness}"/>
<rectangle margin="{templatebinding borderthickness}" x:name="backgroundgradient2" opacity="0" stroke="#ffffffff" strokethickness="2" >
<rectangle.fill>
<lineargradientbrush endpoint=".7,1" startpoint=".7,0">
<gradientstop color="#ffffffff" offset="0"/>
<gradientstop color="#f9ffffff" offset="0.375"/>
<gradientstop color="#e5ffffff" offset="0.625"/>
<gradientstop color="#c6ffffff" offset="1"/>
</lineargradientbrush>
</rectangle.fill>
</rectangle>
<rectangle margin="{templatebinding borderthickness}" x:name="highlight" ishittestvisible="false" opacity="0" stroke="#ff45d6fa" strokethickness="2" />
<contentpresenter horizontalalignment="{templatebinding horizontalcontentalignment}" margin="{templatebinding padding}" x:name="contentpresenter" verticalalignment="{templatebinding verticalcontentalignment}" content="{templatebinding content}" contenttemplate="{templatebinding contenttemplate}"/>
<rectangle x:name="disabledvisualelement" ishittestvisible="false" opacity="0" fill="#a5ffffff" />
<rectangle x:name="focusvisualelement" ishittestvisible="false" visibility="collapsed" stroke="#ff45d6fa" strokethickness="2" />
</grid>
</controltemplate>
</setter.value>
</setter>
</style>
</grid.resources>
<vsm:visualstatemanager.visualstategroups>
<vsm:visualstategroup x:name="commonstates">
<vsm:visualstategroup.transitions>
<vsm:visualtransition generatedduration="00:00:00.1"/>
<vsm:visualtransition from="mouseover" generatedduration="00:00:00.1000000" to="normal"/>
</vsm:visualstategroup.transitions>
<vsm:visualstate x:name="normal"/>
<vsm:visualstate x:name="mouseover"/>
<vsm:visualstate x:name="disabled">
<storyboard>
<doubleanimationusingkeyframes storyboard.targetname="disabledvisualelement" storyboard.targetproperty="(uielement.opacity)">
<splinedoublekeyframe keytime="00:00:00" value="1"/>
</doubleanimationusingkeyframes>
</storyboard>
</vsm:visualstate>
</vsm:visualstategroup>
<vsm:visualstategroup x:name="focusstates">
<vsm:visualstate x:name="focused">
<storyboard>
<doubleanimationusingkeyframes storyboard.targetname="focusvisualelement" storyboard.targetproperty="(uielement.opacity)">
<splinedoublekeyframe keytime="00:00:00" value="1"/>
</doubleanimationusingkeyframes>
</storyboard>
</vsm:visualstate>
<vsm:visualstate x:name="unfocused"/>
<vsm:visualstate x:name="focuseddropdown">
<storyboard>
<objectanimationusingkeyframes duration="00:00:00" storyboard.targetname="popupborder" storyboard.targetproperty="(uielement.visibility)">
<discreteobjectkeyframe keytime="00:00:00">
<discreteobjectkeyframe.value>
<visibility>visible</visibility>
</discreteobjectkeyframe.value>
</discreteobjectkeyframe>
</objectanimationusingkeyframes>
</storyboard>
</vsm:visualstate>
</vsm:visualstategroup>
</vsm:visualstatemanager.visualstategroups>
<border x:name="contentpresenterborder">
<grid>
<togglebutton horizontalalignment="stretch" margin="0" x:name="dropdowntoggle" background="white" borderbrush="{templatebinding borderbrush}" borderthickness="{templatebinding borderthickness}" horizontalcontentalignment="right">
<path height="8" horizontalalignment="center" margin="0,0,0,0" x:name="btnarrow" width="10" stretch="uniform" data="f1 m 301.14,-189.041l 311.57,-189.041l 306.355,-182.942l 301.14,-189.041 z ">
<path.fill>
<solidcolorbrush color="#104f9b" x:name="btnarrowcolor"/>
</path.fill>
</path>
</togglebutton>
<contentpresenter visibility="collapsed" horizontalalignment="{templatebinding horizontalcontentalignment}" margin="{templatebinding padding}" x:name="contentpresenter" verticalalignment="{templatebinding verticalcontentalignment}">
</contentpresenter>
</grid>
</border>
<rectangle x:name="disabledvisualelement" ishittestvisible="false" opacity="0" fill="#a5ffffff" radiusx="3" radiusy="3"/>
<rectangle x:name="focusvisualelement" ishittestvisible="false" opacity="0" stroke="#ff45d6fa" strokethickness="1" radiusx="3" radiusy="3"/>
<popup x:name="popup">
<popup.rendertransform>
<translatetransform x="-125" />
</popup.rendertransform>
<border height="auto" horizontalalignment="stretch" x:name="popupborder" borderbrush="{templatebinding borderbrush}" borderthickness="{templatebinding borderthickness}" cornerradius="3">
<border.background>
<lineargradientbrush endpoint="0.5,1" startpoint="0.5,0">
<gradientstop color="#ffffffff" offset="0"/>
<gradientstop color="#fffefefe" offset="1"/>
</lineargradientbrush>
</border.background>
<scrollviewer x:name="scrollviewer" borderthickness="0" padding="1">
<itemspresenter/>
</scrollviewer>
</border>
</popup>
</grid>
</controltemplate>
</setter.value>
</setter>
Comments
Post a Comment