private void Button_Click(object sender, RoutedEventArgs e) { // Set a random X position bd.PositionX = ra.Next(0, 300); // override default danmaku style Engine.DrawDanmaku_R2L(Utils.GetRandomString(10), bd); }
private void DanmakuRender_Loaded(object sender, RoutedEventArgs e) { // Bind Canvas to WPFDanmakuLib, and set default danmaku style Engine = new WPFDanmakuEngine(DanmakuRender, new BaseDanmaku(), WPFDanmakuEngine.DrawMode.Compatibility); // Draw a R2L danmaku with default style Engine.DrawDanmaku_R2L("Red Area is Canvas."); }