티스토리 탁상달력 사진 공모전용으로 올리는 청남대 사진입니다.
공모전과 관련된 사항은 아래 링크에서 확인하세요.
string.Format(@"Value : {0}", 123);
string str = string.Format(@"function() {alert({0});}", @"Alert Message");
string str = string.Format(@"function() {{alert({0});}}", @"Alert Message");
SystemTray.IsVisible = false; this.ApplicationBar.IsVisible = false;
// Obtain transform information based off root element GeneralTransform gt = element.TransformToVisual(Application.Current.RootVisual); // Find the four corners of the element Point topLeft = gt.Transform(new Point(0, 0)); Point topRight = gt.Transform(new Point(element.RenderSize.Width, 0)); Point bottomLeft = gt.Transform(new Point(0, element.RenderSize.Height)); Point bottomRight = gt.Transform(new Point(element.RenderSize.Width, element.RenderSize.Height));
RotateTransform transform = new RotateTransform(); transform.Angle = 90d; popup.RenderTransform = transform; popup.VerticalOffset = 300 - 480; popup.HorizontalOffset = 300;
public partial class MainPage : PhoneApplicationPage
{
public MainPage()
{
InitializeComponent();
//Add EventHandler
this.OrientationChanged += new EventHandler(MainPage_OrientationChanged);
}
void MainPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
PageOrientation orientation = e.Orientation;
//Check current orientation
if ((orientation & PageOrientation.Portrait) == (PageOrientation.Portrait))
{
// Portrait
}
else
{
// Landscape
}
}
PageOrientation GetCurrentOrientation()
{
return this.Orientation;
}
}
//xaml SupportedOrientations="Portrait" SupportedOrientations="Landscape" SupportedOrientations="PortraitOrLandscape" //Behind code(C#) this.SupportedOrientations = SupportedPageOrientation.Portrait; this.SupportedOrientations = SupportedPageOrientation.Landscape; this.SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
var stream = TitleContainer.OpenStream("FileName.wav");
var effect = SoundEffect.FromStream(stream);
FrameworkDispatcher.Update();
effect.Play();
// Use PhoneDarkThemeVisibility
Visibility visibilityDark = (Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"];
if (visibilityDark == Visibility.Visible)
{
// Dark theme
}
else if (visibilityDark == Visibility.Collapsed)
{
// Light theme
}
// Use PhoneLightThemeVisibility
Visibility visibilityLight = (Visibility)Application.Current.Resources["PhoneLightThemeVisibility"];
if (visibilityLight == Visibility.Collapsed)
{
// Dark theme
}
else if (visibilityLight == Visibility.Visible)
{
// Light theme
}
// Use PhoneLightThemeOpacity
double opacityDark = (double)Application.Current.Resources["PhoneDarkThemeOpacity"];
if (opacityDark == 1.0)
{
// Dark theme
}
else if (opacityDark == 0.0)
{
// Light theme
}
// Use PhoneLightThemeOpacity
double opacityLight = (double)Application.Current.Resources["PhoneLightThemeOpacity"];
if (opacityLight == 0.0)
{
// Dark theme
}
else if (opacityLight == 1.0)
{
// Light theme
}
// Use PhoneForegroundColor
Color colorForeground = (Color)Application.Current.Resources["PhoneForegroundColor"];
if (colorForeground.ToString() == "#FFFFFFFF")
{
// Dark theme
}
else if (colorForeground.ToString() == "#DE000000")
{
// Light theme
}
// Use PhoneBackgroundColor
Color colorBackground = (Color)Application.Current.Resources["PhoneBackgroundColor"];
if (colorBackground.ToString() == "#FF000000")
{
// Dark theme
}
else if (colorBackground.ToString() == "#FFFFFFFF")
{
// Light theme
}
//Get background color Color themeBackColor = (Color)Application.Current.Resources["PhoneBackgroundColor"]; //Get foreground color Color themeForeColor = (Color)Application.Current.Resources["PhoneForegroundColor"]; //Get accent color Color accentColor = (Color)Application.Current.Resources["PhoneAccentColor"];
| Theme 종류 | Background ARGB | Foreground ARGB |
| Dark | #FF000000 | #FFFFFFFF |
| Light | #FFFFFFFF | #DE000000 |
| Accent color | ARGB |
| magenta | #FFFF0097 |
| purple | #FFA200FF |
| teal | #FF00ABA9 |
| lime | #FF8CBF26 |
| brown | #FFA05000 |
| pink | #FFE671B8 |
| orange | #FFF09609 |
| blue | #FF1BA1E2 |
| red | #FFE51400 |
| green | #FF339933 |