本文整理汇总了C#中System.Windows.Media.Effects.DropShadowEffect类的典型用法代码示例。如果您正苦于以下问题:C# DropShadowEffect类的具体用法?C# DropShadowEffect怎么用?C# DropShadowEffect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DropShadowEffect类属于System.Windows.Media.Effects命名空间,在下文中一共展示了DropShadowEffect类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: KNTabView
public KNTabView()
: base()
{
TabHeight = 30.0;
SnapsToDevicePixels = true;
contentCanvas = new Border();
contentCanvas.Background = new SolidColorBrush(Color.FromRgb(245, 245, 245));
contentCanvas.BorderBrush = new SolidColorBrush(Color.FromArgb(25, 0, 0, 0));
contentCanvas.BorderThickness = new Thickness(1.0);
Canvas.SetZIndex(contentCanvas, kContentZIndex);
DropShadowEffect effect = new DropShadowEffect();
effect.BlurRadius = 3.0;
effect.Color = Colors.Black;
effect.Direction = 90.0;
effect.ShadowDepth = 0.0;
contentCanvas.Effect = effect;
this.Children.Add(contentCanvas);
this.AddObserverToKeyPathWithOptions(this, "TabHeight", 0, null);
this.AddObserverToKeyPathWithOptions(this, "ActiveItem", 0, null);
this.AddObserverToKeyPathWithOptions(this, "LeftControl", 0, null);
this.AddObserverToKeyPathWithOptions(this,
"Items",
KNKeyValueObservingOptions.KNKeyValueObservingOptionNew |
KNKeyValueObservingOptions.KNKeyValueObservingOptionOld,
null);
}
开发者ID:iKenndac,项目名称:KNControlsWPF,代码行数:32,代码来源:KNTabView.cs
示例2: rect1_MouseDown
private void rect1_MouseDown(object sender, MouseButtonEventArgs e)
{
Shape s = (Shape)sender;
startx = Canvas.GetLeft(s);
starty = Canvas.GetTop(s);
s.MouseMove += rect1_MouseMove;
s.CaptureMouse();
e.Handled = true;
Point p = e.GetPosition((IInputElement)canvas1);
deltax = p.X - Canvas.GetLeft(s);
deltay = p.Y - Canvas.GetTop(s);
if (last != null)
{
if (last.Effect != null)
{
last.Effect = null;
Canvas.SetZIndex(last, 0);
}
}
last = s;
DropShadowEffect ef = new DropShadowEffect();
ef.Color = Colors.Red;
ef.BlurRadius = 30;
ef.ShadowDepth = 0;
s.Effect = ef;
Canvas.SetZIndex(last, 10);
}
开发者ID:tpsa,项目名称:pwsg,代码行数:27,代码来源:MainWindow.xaml.cs
示例3: TwitterBlock
/// <summary>
/// create a new twitter block
/// </summary>
public TwitterBlock(HomePage parent)
{
InitializeComponent();
_parentHome = parent;
//Handlers for timers
AddHandler(TouchUpEvent, new EventHandler<TouchEventArgs>(twitterBoxClicked), true);
AddHandler(MouseUpEvent, new MouseButtonEventHandler(twitterBoxClicked), true);
DropShadowEffect dShdow = new DropShadowEffect();
dShdow.BlurRadius = 10;
dShdow.Opacity = 0.365;
Effect = dShdow;
//create a new dispatcher
dt = new DispatcherTimer();
dt.Interval = TimeSpan.FromSeconds(7);
dt.Tick += dt_Tick;
if (tweets.Count == 0)
{
IEnumerable<TwitterStatus> result = service.getTweets();
if (result != null)
{
foreach (TwitterStatus t in result)
{
//Cache
tweets.Add(t);
}
}
}
dt.Start();
}
开发者ID:raouldc,项目名称:OptiDev,代码行数:37,代码来源:TwitterBlock.xaml.cs
示例4: Tile
public Tile(ICase tile, TileFactory tileFactory, List<Unite> listUnite, SolidColorBrush playerBrush)
{
InitializeComponent();
this.tile = tile;
this.nbUnite = listUnite.Count;
VisualBrush myBrush = new VisualBrush();
aPanel = new Grid();
aPanel.Background = tileFactory.getViewTile(tile);
// Create some text.
TextBlock backText = new TextBlock();
Canvas.SetZIndex(backText, 3);
if (listUnite != null && listUnite.Count > 0)
{
backText.Text = " " + listUnite.Count.ToString() + " ";
backText.Background = (SolidColorBrush)new BrushConverter().ConvertFromString(listUnite[0].Proprietaire.Couleur);
backText.Foreground = Brushes.White;
}
FontSizeConverter fSizeConverter = new FontSizeConverter();
backText.FontSize = (double)fSizeConverter.ConvertFromString("10pt");
backText.Margin = new Thickness(10);
Grid.SetColumn(backText, 0);
Grid.SetRow(backText, 0);
DropShadowEffect myDropShadowEffect = new DropShadowEffect();
myDropShadowEffect.BlurRadius = 1;
myDropShadowEffect.Color = Color.FromRgb(0,0,0);
myDropShadowEffect.ShadowDepth = 2;
backText.Effect=myDropShadowEffect;
aPanel.Children.Add(backText);
myBrush.Visual = aPanel;
rect.Fill = myBrush;
rect1.Stroke = playerBrush;
}
开发者ID:BenjBoug,项目名称:INSA-SmallWorld,代码行数:34,代码来源:Tile.xaml.cs
示例5: Webcam
public Webcam()
{
InitializeComponent();
// Subscribe command bindings
CommandBindings.Add(new CommandBinding(CaptureImageCommands.CaptureImage,
CaptureImage_Executed, CaptureImage_CanExecute));
CommandBindings.Add(new CommandBinding(CaptureImageCommands.RemoveImage,
RemoveImage_Executed));
CommandBindings.Add(new CommandBinding(CaptureImageCommands.ClearAllImages,
ClearAllImages_Executed));
_tweetBtn.Background = new SolidColorBrush((Color) ColorConverter.ConvertFromString("#FF146290"));
DropShadowEffect dShdow = new DropShadowEffect();
dShdow.BlurRadius = 10;
dShdow.Opacity = 0.365;
_tweetBtn.Effect = dShdow;
// Create default device
SelectedWebcamMonikerString = (CapDevice.DeviceMonikers.Length > 0)
? CapDevice.DeviceMonikers[0].MonikerString
: "";
_sbIn = new Storyboard();
Util.FadeIn(_sbIn, _selectedImg);
Util.FadeIn(_sbIn, _tweetTxt);
Util.FadeIn(_sbIn, _imagesBox);
Util.FadeIn(_sbIn, webcamPlayer);
}
开发者ID:raouldc,项目名称:OptiDev,代码行数:29,代码来源:Webcam.xaml.cs
示例6: EaseValue
public static void EaseValue(DropShadowEffect current, DropShadowEffect startValue, DropShadowEffect endValue, double percent)
{
if ( current.BlurRadius != endValue.BlurRadius) current.BlurRadius = EaseHelper.EaseValue(startValue.BlurRadius, endValue.BlurRadius, percent);
if (current.Opacity != endValue.Opacity) current.Opacity = EaseHelper.EaseValue(startValue.Opacity, endValue.Opacity, percent);
if (current.Color != endValue.Color) current.Color = EaseHelper.EaseValue(startValue.Color, endValue.Color, percent);
if (current.Direction != endValue.Direction) current.Direction = EaseHelper.EaseValue(startValue.Direction, endValue.Direction, percent);
if (current.ShadowDepth != endValue.ShadowDepth) current.ShadowDepth = EaseHelper.EaseValue(startValue.ShadowDepth, endValue.ShadowDepth, percent);
}
开发者ID:realsaraf,项目名称:eConcierge,代码行数:8,代码来源:Extras.cs
示例7: getSombra1
public static DropShadowEffect getSombra1()
{
DropShadowEffect sombra = new DropShadowEffect();
sombra.RenderingBias = RenderingBias.Performance;
sombra.Direction = -90;
sombra.BlurRadius = 10;
sombra.ShadowDepth = 10;
return sombra;
}
开发者ID:mialejandriastartup,项目名称:mialejandria.localbibliocvs,代码行数:9,代码来源:Efectos.cs
示例8: DropEffect
public DropShadowEffect DropEffect()
{
DropShadowEffect dropeffect = new DropShadowEffect();
dropeffect.ShadowDepth = 3;
dropeffect.Color = Color.FromRgb(0, 0, 0);
dropeffect.Opacity = .7;
dropeffect.BlurRadius = 5.8;
return dropeffect;
}
开发者ID:Creative2,项目名称:tab_slider,代码行数:9,代码来源:Effects.cs
示例9: listTweetsInTheScrollViewer
/// <summary>
/// Helper method to list all the tweets in the scrollviewer
/// </summary>
private void listTweetsInTheScrollViewer()
{
IEnumerable<TwitterStatus> tweets = service.getTweets();
listTitle.FontFamily = Util.buttonTextFont;
listTitle.Foreground = new SolidColorBrush(Util.buttonTextColor);
// set up the "Tweet Us" button properties
_tweetUsBtn.FontFamily = Util.buttonTextFont;
DropShadowEffect dShdow = new DropShadowEffect();
dShdow.BlurRadius = 10;
dShdow.Opacity = 0.365;
_tweetUsBtn.Effect = dShdow;
// iterate over the twitter list
if (tweets != null)
{
int i = 0;
foreach (TwitterStatus tweet in tweets)
{
// a tweet element (tweet image + tweet message)
TweetListElement twElm = new TweetListElement();
BrushConverter bc = new BrushConverter();
// change the background colour of each element
Brush br = i%2 == 0 ? (Brush) bc.ConvertFrom("#FF073f60") : (Brush) bc.ConvertFrom("#FF4899c8");
twElm.setBackground(br);
twElm.setMargin(0, 0, 0, 5);
// put the twitter text in this variable
String twitterText = tweet.TextDecoded;
twElm.setTweetText(twitterText);
// put the default twitter image, for the case that the url is not working.
BitmapImage img = new BitmapImage();
img.BeginInit();
img.UriSource = new Uri("pack://application:,,/Resources/images/logoCCF.png");
img.EndInit();
//Ask Twitter to get url
List<String> urls = service.getImageUrlsForTweet(tweet);
if (urls.Count > 0)
{
String imgUrl = urls[0];
img = service.getBitmapImageForUrl(imgUrl);
}
Util.SetupQR(QRText, "https://twitter.com/childcancernz");
twElm.setTweetImg(img);
_tweetsList.Children.Add(twElm);
i++;
}
}
}
开发者ID:raouldc,项目名称:OptiDev,代码行数:59,代码来源:TwitterList.xaml.cs
示例10: Widget
public Widget(LogicCanvasType type)
{
InitializeComponent();
ToolTip = type.ToString();
glow = new DropShadowEffect();
glow.ShadowDepth = 0;
glow.Color = Colors.Blue;
glow.BlurRadius = 5;
}
开发者ID:buptkang,项目名称:LogicPad,代码行数:10,代码来源:Widget.xaml.cs
示例11: DragPreviewAdorner
public DragPreviewAdorner(UIElement adornedElement, FrameworkElement previewElement)
: base(adornedElement)
{
SetPreviewElement(previewElement);
DropShadowEffect d = new DropShadowEffect();
d.BlurRadius = 25.0;
d.ShadowDepth = 2;
d.Opacity = 0.5;
this.Effect = d;
}
开发者ID:edealbag,项目名称:bot,代码行数:10,代码来源:DragPreviewAdorner.cs
示例12: pnlVerFondoSeries
public pnlVerFondoSeries()
{
InitializeComponent();
sombra = new DropShadowEffect();
sombra.Direction = -90;
sombra.ShadowDepth = 20;
sombra.BlurRadius = 20;
sombra.RenderingBias = RenderingBias.Performance;
this.Height = MIN_SIZE;
this.Loaded += new RoutedEventHandler(pnlVerFondoSeries_Loaded);
}
开发者ID:mialejandriastartup,项目名称:mialejandria.mifaro,代码行数:12,代码来源:pnlVerFondoSeries.xaml.cs
示例13: Clone
private static DropShadowEffect Clone(DropShadowEffect dropShadowEffect)
{
return new DropShadowEffect()
{
BlurRadius = dropShadowEffect.BlurRadius,
Color = dropShadowEffect.Color,
Direction = dropShadowEffect.Direction,
Opacity = dropShadowEffect.Opacity,
RenderingBias = dropShadowEffect.RenderingBias,
ShadowDepth = dropShadowEffect.ShadowDepth
};
}
开发者ID:x01673,项目名称:MaterialDesignInXamlToolkit,代码行数:12,代码来源:ShadowConverter.cs
示例14: ShadowProvider
public static DropShadowEffect ShadowProvider()
{
if(_dropShad==null)
{
_dropShad = new DropShadowEffect();
_dropShad.BlurRadius = 10;
_dropShad.Opacity = 0.35;
_dropShad.ShadowDepth = 3;
_dropShad.RenderingBias = RenderingBias.Performance;
}
return _dropShad;
}
开发者ID:gdlprj,项目名称:duscusys,代码行数:12,代码来源:ShapeUtils.cs
示例15: CreateGlowEffect
public static DropShadowEffect CreateGlowEffect(Color color)
{
DropShadowEffect glowEffect = new DropShadowEffect()
{
ShadowDepth = 0,
Color = color,
Opacity = 1,
BlurRadius = 20
};
return glowEffect;
}
开发者ID:steamprodz,项目名称:DantistApp,代码行数:12,代码来源:EffectsHelper.cs
示例16: pnlMenuLugar
public pnlMenuLugar()
{
InitializeComponent();
sombra = new DropShadowEffect();
sombra.Direction = -90;
sombra.ShadowDepth = 10;
sombra.BlurRadius = 10;
sombra.RenderingBias = RenderingBias.Performance;
this.Height = MIN_SIZE;
initEventHandlers();
}
开发者ID:mialejandriastartup,项目名称:mialejandria.mifaro,代码行数:12,代码来源:pnlMenuLugar.xaml.cs
示例17: About
public About()
{
InitializeComponent();
textBlock1.Text = VersionInfo;
myDropShadow = new DropShadowEffect();
myDropShadow.Opacity = 1;
myDropShadow.ShadowDepth = 0;
myDropShadow.BlurRadius = 8;
myDropShadow.Color = Colors.Red;
this.Closing += new System.ComponentModel.CancelEventHandler(About_Closing);
textBox1.Text = Properties.Resources.Credits;
}
开发者ID:nazariitashak,项目名称:UOMachine,代码行数:12,代码来源:About.xaml.cs
示例18: pnlCompartir
public pnlCompartir()
{
InitializeComponent();
sombra = new DropShadowEffect();
sombra.Direction = -90;
sombra.ShadowDepth = 10;
sombra.BlurRadius = 10;
sombra.RenderingBias = RenderingBias.Performance;
this.Height = MIN_SIZE;
this.Visibility = System.Windows.Visibility.Hidden;
}
开发者ID:mialejandriastartup,项目名称:mialejandria.mifaro,代码行数:13,代码来源:pnlCompartir.xaml.cs
示例19: MainWindow
public MainWindow()
{
InitializeComponent();
randomNumber = new Random();
m_arrUsedCards = new bool[iCardsNumber];
m_arrCardState = new eCatdState[iCardsOnScreen];
effectSelected = new DropShadowEffect();
effectSelected.ShadowDepth = 0;
effectSelected.BlurRadius = 20;
effectSelected.Color = brushSelectedColor.Color;
m_Cards = new Card[iCardsOnScreen];
}
开发者ID:HarelM,项目名称:Set-Game,代码行数:14,代码来源:MainWindow.xaml.cs
示例20: Grid_Loaded
private void Grid_Loaded(object sender, RoutedEventArgs e)
{
glowSelected = new DropShadowEffect();
glowSelected.ShadowDepth = 0;
glowSelected.BlurRadius = 15;
glowSelected.Color = Colors.Red;
Database.SelectAll(dataGrid);
Database.DeserializeRunsFromDB();
totalRuns.Text = "Total runs: " + Database.dataTable.Rows.Count.ToString();
dataGrid.SelectedIndex = 0;
}
开发者ID:espilioto,项目名称:TFOI,代码行数:14,代码来源:PageRuns.xaml.cs
注:本文中的System.Windows.Media.Effects.DropShadowEffect类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论