Definitely not so. Your IView interface will define a set of contracts / methods (including properties) that can be accessed at your business level. It is completely wrong to expose your control in an interface as follows:
public interface IView
{
TextBox UserNameTextBox{get;set;}
}
, . .
, .
.
public interface IView
{
public void SetUserName(string Text);
}
winform, -.
, ().
, Employee .
Employee , Employee.
BL n .
public class Employee
{
}
public interface IEmployeeView
{
void SetEmployee(Employee employee);
}
public partial class EmployeeForm:WinForm,IEmployeeView
{
public void SetEmployee(Employee employee)
{
ENameTextBox.Text = employee.FirstName+" "+employee.LastName;
}
}