Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Error event "loaded"

$
0
0

I don`t understand this error occurs, though I have declared this method. look at this code and error.

'WpfApplication5.MonoBehaviour' does not contain a definition for 'event_rotate' and no extension method 'event_rotate' accepting a first argument of type could be found (are you missing a using directive or an assembly reference?)

Code C#1:

private void event_rotate(object sender, RoutedEventArgs e)
{
    MessageBox.Show("asdasada");
}

Code C#2:

using UnityEngine;
using System.Collections;
namespace WpfApplication5
{
    /// <summary>
    /// Interaction logic for Window2.xaml
    /// </summary>
    public partial class Window2 : MonoBehaviour

Code XAML:

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="WpfApplication5.MonoBehaviour"
    Title="Window2" Height="300" Width="300" Loaded="event_rotate">


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>