this.Relayout += NinePatchButton_Relayout;
}
+ private static string AsPath(string url)
+ {
+ if (!string.IsNullOrEmpty(url) && url.Contains("*Resource*"))
+ {
+ string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+ url = url.Replace("*Resource*", resource);
+ }
+
+ return url;
+ }
+
protected override void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
{
UpdateButton();
UpdateButton();
}
- private static string AsPath(string url)
- {
- if (!String.IsNullOrEmpty(url) && url.Contains("*Resource*"))
- {
- string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
- url = url.Replace("*Resource*", resource);
- }
-
- return url;
- }
-
private void UpdateButton(Color color, string url)
{
PropertyMap outputVisualMap = null;
private void UpdateButton()
{
- if (ViewStyle is NinePatchButtonStyle style && !String.IsNullOrEmpty(style.NormalImageUrl))
+ if (ViewStyle is NinePatchButtonStyle style && !string.IsNullOrEmpty(style.NormalImageUrl))
{
if (ControlState == ControlState.Normal)
{
public class NinePatchButtonStyle : ButtonStyle
{
public string NormalImageUrl { get; set; }
+
public string PressedImageUrl { get; set; }
+
public string DisabledImageUrl { get; set; }
+
public Tizen.NUI.Color NormalColor { get; set; }
+
public Tizen.NUI.Color PressedColor { get; set; }
+
public Tizen.NUI.Color DisabledColor { get; set; }
}
}