Flex – Panel title 改變顏色 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 2月 14, 2012 在使用 spark 的 Panel Control Library 時需對 title 改變其 color , font size, font weight 時,此時可以使用 style 的方式來設定. 加入上述的 style 時其在顯示 Panel title 的顏色就會變成是白色. 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 留言
WPF - 深入 Style 6月 13, 2013 Style 用來在類型的不同實例之間共享屬性、資源和事件處理程序,您可以將 Style 看作是將一組屬性值應用到多個元素的捷徑。 這是MSDN上對Style的描述,翻譯的還算中規中矩。Style(樣式),簡單來說,就是一種對屬性值的批處理,類似于Html的CSS,可以快速的設置一系列屬性值到UI元素。 示例 一個最簡單的Style的例子: <Window> <Grid> <Grid.Resources> <Style TargetType="{x:Type Button}" x:Key="ButtonStyle"> <Setter Property="Height" Value="22"/> <Setter Property="Width" Value="60"/> </Style> </Grid.Resources> <Button Content="Button" Style="{StaticResource ButtonStyle}"/> <Button Content="Button" Style="{StaticResource ButtonStyle}" Margin="156,144,286,145" /> </Grid> </Window> 關于Resources的知識,請參見 MSDN ,這里創建了一個目標類型為Button的ButtonStyle,兩個Button使用靜態資源( StaticResource )的查找方式來找到這個Style。Style中定義了Button的高度(Height)和寬度(Width),當使用了這個Style后,兩個Button無需手動設置,即可自動設置... 閱讀完整內容
C# – M$ Chart Control 自定 ToolTip 的顯示 1月 31, 2013 在使用 M$ Chart Control 來顯示 Chart 時, 一般的 Requirments 其 ToolTip 在顯示一般都為 X/Y Value,可是當有特別的資料需顯示時,那又該如何呢?在其 DataPoint Class 中提供一個SetCustomProperty Member 讓 User 可以設定其 Custom Property Value,那只需在 Series Class 中設定 ToolTipProperty 後,其 ToolTip 即可顯示 Custom Property. Series s = new Series(); s.Name = "SeriesName"; s.ChartType = SeriesChartType.Line; s.MarkerStyle = MarkerStyle.Circle; s.MarkerSize = 8; s.BorderWidth = 3; s.ToolTip = "Wafer Id: #AXISLABEL\n" + "Time: #CUSTOMPROPERTY(TIME) \n" + "Y Value: #VALY"; 閱讀完整內容
.NET - 使用 jQuery 跟 ASP.NET 泛型處理常式(ASHX) 實作 AJAX 2月 07, 2012 需在原本的頁面上加入附加的功能,那做法不外乎加入 Window.Open 的方式來實作附加功能上的 UI ,不然就是使用圖層的觀念來實作在原本的頁面中,那在此介紹使用圖層的部份來達到這個功能. 那要達到此功能,所選取的方案為泛型處理常式(ASHX)做為 Server 端提供資料的 Service,那 Client 端使用 jQuery 實作 AJAX 來呼叫 Server 端存取資料~ Client 端: Code Snippet < script type ="text/javascript" language ="javascript"> $(document).ready( function () { var winH = $(window).height(); var winW = $(window).width(); $( '#mask' ).css({ 'width' : winW, 'height' : winH, "opacity" : 0.8 }).hide(); $( "#window" ).css({ "top" : winH / 2 - $( "#window" ).height() / 2, "left" : winW / 2 - $( "#window" ).width() / 2 }).hide().corner( "cc:#000" ).children( "div" ).css({ "opacity" : 0.8 }); }); function showWindow(apmSID, roleSID, layerSID) { $( "#apmid" ).val(apmSID); $( ... 閱讀完整內容
留言
張貼留言