2016-05-13 48 views
0

後市展望:如何刪除按鈕的邊框顏色或/和控制其行爲?

之前點擊 - >點擊後 - >後發佈

enter image description hereenter image description hereenter image description here

什麼是真正發生

之前點擊 - >點擊後 - >發佈後

enter image description hereenter image description hereenter image description here

因此,按鈕邊框保持綠色,直到用戶按下另一個按鈕(另一個按鈕變爲綠色)。我如何覆蓋這種行爲?如果我不能那麼我想刪除整個綠色邊界的東西。我無法通過這些屬性來做到這一點。邊框厚度爲0,並且此按鈕上沒有邊框筆刷。那我該怎麼做?請和感謝

編輯: XAML

<Button x:Name="UpButton" Margin="0,5,5,0" Grid.Row="1" Grid.Column="1" PreviewMouseUp="UpButton_PreviewMouseUp" BorderThickness="0" > 
    <StackPanel Height = "90" > 
     <TextBlock x:Name="UpButtonText" Text="Up" FontSize="13" Width="18" Margin="0,2,0,4"/> 
     <Image x:Name="UpButtonImage" Width="55" Source="/EZ3D;component/Resources/loc_up.png" Height="58"/> 
    </StackPanel> 
</Button> 
+0

是綠色邊框通過CSS設置? – sammarcow

+0

@sam不,我認爲它是從dev express提供的資源字典 –

+0

後面的代碼還是MVVM? – StepUp

回答

0

設置圖像回到原來的當鼠標離開圖像的尺寸。

http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onmouseover

例如需要的jQuery:

<Button x:Name="UpButton" Margin="0,5,5,0" Grid.Row="1" Grid.Column="1" PreviewMouseUp="UpButton_PreviewMouseUp" BorderThickness="0" > 
    <StackPanel Height = "90" > 
     <TextBlock x:Name="UpButtonText" Text="Up" FontSize="13" Width="18" Margin="0,2,0,4"/> 
     <Image x:Name="UpButtonImage" Width="55" Source="/EZ3D;component/Resources/loc_up.png" Height="58" onmouseout="javascript:$(\"[name^='UpButtonImage']\").attr(\"src\",\"/EZ3D;component/Resources/loc_up.png\"); 

}); 「;」/>

+0

嗨,這種行爲是不是有關的圖像。它與整個按鈕有關 –

+0

在您的問題中,我們詢問是否通過CSS設置了綠色。無論哪種情況,概念都是一樣的:使用javascript onmmouse函數來確定鼠標何時離開按鈕的懸停區域,並設置適當的樣式。您需要提供設置樣式的代碼,但您可能需要的屬性是'border-style:none' – sammarcow

相關問題